gpt4 book ai didi

symfony - KhepinYamlFixturesBundle 给出 fatal error :调用未定义的方法 Symfony\Bundle\DoctrineBundle\Registry::getManager()

转载 作者:行者123 更新时间:2023-12-04 18:13:16 25 4
gpt4 key购买 nike

我已经安装了 [KhepinYamlFixturesBundle][1] Symfony 2.0.16 来加载固定装置,但是当我运行时

php app/console khepin:yamlfixtures:load

我收到此错误:

Fatal error: Call to undefined method Symfony\Bundle\DoctrineBundle\Registry::getManager() in D:\public_html\s2\trunk\src\Khepin\YamlFixturesBundle\Loader\YamlLoader.php on line 138



有解决方法吗?

编辑:

我也试过 Symfony 2.1。成功安装 Symfony 2.1 和教义-fixtures-bundle 后,我运行:
php composer.phar update khepin/yaml-fixtures-bundle
它说:
Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1
- Installation request for khepin/yaml-fixtures-bundle dev-master -> satisfiable by khepin/yaml-fixtures-bundle dev-master.

- Conclusion: don't install doctrine/doctrine-fixtures-bundle v2.1.0-ALPHA

- Conclusion: remove doctrine/doctrine-fixtures-bundle dev-master

- khepin/yaml-fixtures-bundle dev-master requires doctrine/doctrine-fixtures-bundle 2.* -> satisfiable by
doctrine/doctrine-fixtures-bundle v2.0.0, doctrine/doctrine-fixtures-bundle v2.0.1,
doctrine/doctrine-fixtures-bundle v2.1.0-ALPHA, doctrine/doctrine-fixtures-bundle 2.0.x-dev.

- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle v2.0.0.

- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle v2.0.1.

- Can only install one of: doctrine/doctrine-fixtures-bundle dev-master, doctrine/doctrine-fixtures-bundle 2.0.x-dev.

- Installation request for doctrine/doctrine-fixtures-bundle dev-master -> satisfiable by doctrine/doctrine-fixtures-bundle dev-master.

`

最佳答案

对于 2.1,捆绑包需要版本为“2.”的固定装置捆绑包。由于 Composer 最近将“最低稳定性”切换为“稳定”,因此 2. 和 dev-master 不再等价。

如果你真的需要“dev-master”,你可以使用:

require: {
"khepin/yaml-fixtures-bundle": "dev-master as 2.1.0"
...
}

例如。

更新:

我推送了代码,现在应该用旧版本的 Doctrine 来解决这个问题。

关于symfony - KhepinYamlFixturesBundle 给出 fatal error :调用未定义的方法 Symfony\Bundle\DoctrineBundle\Registry::getManager(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12211806/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com