Symfony 3.4 和 Fixtures Bundle 问题与 bundle version 3.0 [英] Symfony 3.4 and Fixtures Bundle issue with bundle version 3.0
本文介绍了Symfony 3.4 和 Fixtures Bundle 问题与 bundle version 3.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试从以下位置配置包:https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
I am trying to configure the bundle from : https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
当我尝试运行命令时:
$ php bin/console doctrine:fixtures:load
出现错误:在 LoadDataFixturesDoctrineCommand.php 第 95 行中:找不到要加载的任何装置服务.
getting error: In LoadDataFixturesDoctrineCommand.php line 95: Could not find any fixture services to load.
推荐答案
您需要更新(app/config/services.yml)
You need to update (app/config/services.yml)
services:
resource: '../../src/DataFixtures/*'
https://symfony.com/doc/master/bundles/DoctrineFixturesBundle/index.html
其他问题在上面的教程中
Other problem is here in to the above tutorial
// src/DataFixtures/AppFixtures.php
namespace App\DataFixtures;
命名空间应该是:
namespace DataFixtures;
这篇关于Symfony 3.4 和 Fixtures Bundle 问题与 bundle version 3.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文