Symfony2 DoctrineFixturesBundle namespace error
I have a big problem with the instrumentation package that I cannot solve. I follow the steps that should be followed by adding lines to the deps file, installing them, registering at startup and appkernel.
When I try to run even only
, it breaks down to:
Fatal error: Class 'Doctrine\Bundle\DoctrineBundle\Command\DoctrineCommand'
not found in /var/www/.../bundles/Doctrine/Bundle/FixturesBundle/
Command/LoadDataFixturesDoctrineCommand.php on line 40
Which seems to be correct because I don't have a DoctrineBundle directory underneath
. If I change this line to
, it works fine because this class is under this namespace.
Of course, I cannot leave it. I have looked through the documentation, problems, everything, but it seems that nobody else has the same problem, so I have to leave out some of the obvious ones here.
source to share
Not too long ago, all Doctrine Bundles moved to the Doctrine organization . This is causing some confusion based on which repository and branch you are using.
If you are using Symfony 2.0.x, then yours
should look something like this:
[DoctrineFixturesBundle] git=http://github.com/doctrine/DoctrineFixturesBundle.git target=bundles/Symfony/Bundle/DoctrineFixturesBundle version=origin/2.0
Please note that the target / namespace is actually
However, you shouldn't have any problems using the latter
with Symfony 2.0.x - if you update the rest of the Doctrine dependencies as well. You can use this instead
[//github.com/doctrine/common.git version=2.2.0 [ ] git=http://github.com/doctrine/dbal.git version=2.2.1 [ ] git=http://github.com/doctrine/doctrine2.git version=2.2.0 [ ] git=http://github.com/doctrine/data-fixtures.git [ ] git=http://github.com/doctrine/DoctrineFixturesBundle.git target=bundles/Doctrine/Bundle/FixturesBundle] git=http:
source to share