Doctrine orm 在symfony 2.1.4中安装条令数据固定装置
以下是我所做的:\Doctrine orm 在symfony 2.1.4中安装条令数据固定装置,doctrine-orm,symfony-2.1,Doctrine Orm,Symfony 2.1,以下是我所做的:\ 在composer.json中添加了以下依赖项 "doctrine/doctrine-fixtures-bundle": "dev-master", "doctrine/data-fixtures": "dev-master" 在终端上运行以下命令: php composer.phar更新 在appKernel.php中添加了以下行 新条令\Bundle\FixturesBundle\DoctrineFixturesBundle() 当我在提示符下运行任何symfony命
"doctrine/doctrine-fixtures-bundle": "dev-master",
"doctrine/data-fixtures": "dev-master"
Class not found: Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle
然后我打开vendor\composer\autoload_namespace.php并添加了以下行:
'Doctrine\\Bundle\\FixturesBundle' => $vendorDir . '/doctrine/doctrine-fixtures-bundle/'
错误消失了,我可以轻松地使用数据夹具
我的问题是,当我运行composer update时,是应该将名称空间自动插入vendor\composer\autoload_namespaces.php,还是必须手动将上面的行插入autoload_namespaces.php?
在文档中,我没有找到任何说明手动插入名称空间的内容