I have Symfony 3.1 project with Doctrine and
doctrine/doctrine-fixtures-bundle and
doctrine/data-fixtures installed.
However, when i run a console command
php bin/console doctrine:fixtures:load
i get a message saying that there are no commands defined in the doctrine:fixtures namespace.
The class DoctrineBundleFixturesBundleCommandLoadDataFixturesDoctrineCommand exists.
Please suggest how to fix that.
Advertisement
Answer
Run first php bin/console and see if the command appear in the list.
If it doesn’t, then you have to load the bundle in the AppKernel.php
$bundles[] = new DoctrineBundleFixturesBundleDoctrineFixturesBundle();