我的灯具捆绑有一个大问题,我无法解决。我
按照预期的步骤进行操作,将行添加到
deps 文件,安装它们,在自动加载中注册它们并
应用程序内核。
当我尝试只跑步时app/console
,它打破了:
Fatal error: Class 'Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand'
not found in /var/www/.../bundles/Doctrine/Bundle/FixturesBundle/
Command/LoadDataFixturesDoctrineCommand.php on line 40
这似乎是正确的,因为我没有 DoctrineBundle 目录
在下面Doctrine\Bundle
, 只有DoctrineFixturesBundle
。
如果我将该行更改为Symfony\Bundle\DoctrineBundle\...
有用
完美,因为该类实际上位于该名称空间下。
我当然不能就这么放着不管。
我搜索了文档、问题、一切,但似乎
没有人有同样的问题,所以我一定错过了一些明显的问题
点这里。
有任何想法吗?
Thanks
不久前,大家教义包移至教义组织 http://symfony.com/blog/symfony-2-1-the-doctrine-bundle-has-moved-to-the-doctrine-organization。根据您使用的存储库和分支,这会导致一些混乱。
如果您使用的是 Symfony 2.0.x,那么您的deps
应该看起来像这样:
[DoctrineFixturesBundle]
git=http://github.com/doctrine/DoctrineFixturesBundle.git
target=bundles/Symfony/Bundle/DoctrineFixturesBundle
version=origin/2.0
请注意,目标/命名空间实际上是Symfony\Bundle\DoctrineFixturesBundle
.
但是,使用最新版本应该不会有任何问题DoctrineFixturesBundle
使用 Symfony 2.0.x - 只要您还升级其余的 Doctrine 依赖项。您可以在您的deps
反而:
[doctrine-common]
git=http://github.com/doctrine/common.git
version=2.2.0
[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
version=2.2.1
[doctrine]
git=http://github.com/doctrine/doctrine2.git
version=2.2.0
[doctrine-fixtures]
git=http://github.com/doctrine/data-fixtures.git
[DoctrineFixturesBundle]
git=http://github.com/doctrine/DoctrineFixturesBundle.git
target=bundles/Doctrine/Bundle/FixturesBundle
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)