"make:fixtures" 命名空间中没有定义任何命令
There are no commands defined in the "make:fixtures" namespace
使用此命令后:
php bin/console make:fixtures:load
我收到此错误:
There are no commands defined in the "make:fixtures" namespace.
加载灯具的命令是:
doctrine:fixtures:load
然而,要制作夹具是:
make:fixture
一定要使用“dev”环境。
如果需要,编辑您的环境文件:.env.local
###> symfony/framework-bundle ###
APP_ENV=dev
当环境设置为“prod”时,此消息经常出现。
您还可以编辑 config/bundles.php 以允许(风险自负)在“prod”环境中使用学说固定装置:
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],
使用此命令后:
php bin/console make:fixtures:load
我收到此错误:
There are no commands defined in the "make:fixtures" namespace.
加载灯具的命令是:
doctrine:fixtures:load
然而,要制作夹具是:
make:fixture
一定要使用“dev”环境。
如果需要,编辑您的环境文件:.env.local
###> symfony/framework-bundle ###
APP_ENV=dev
当环境设置为“prod”时,此消息经常出现。
您还可以编辑 config/bundles.php 以允许(风险自负)在“prod”环境中使用学说固定装置:
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],