3
首先,我不能使用作曲家因为我的ISP,所以,我需要一种方法来手动安装DoctrineFixturesBundle
,所以我开始从github
下载它,也data-fixtures
捆绑。 我在我的项目创建这个文件夹结构如何安装DoctrineFixturesBundle离线
vendor
- doctrine
- doctrine-fixtures-bundle
- Doctrine
- Bundle
- FixturesBundle
DoctrineFixturesBundle.php
..other files...
vendor
- doctrine
- data-fixtures
- lib
- test
composer.json
..other files...
我通过读位于每个包内的文件composer.json这样做,然后我编辑了AppKernel.php
并添加
public function registerBundles(){
.....
new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle(),
.....
}
,但它无法正常工作,我总是得到:
Fatal error: Class 'Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle' not
found in D:\wamp\www\cupon\app\AppKernel.php on line 20
我错过了什么吗?我可以手动安装这些软件包吗?
希望你能帮助我。 感谢
呵呵你比我快...我还在打字。答案应该有效 - 之后执行'composer dump-autoload -o' - 其他解决方案不需要对composer.json进行任何更改就会暂时将'Doctrine'文件夹移动到'src /' – nifr
有很多'composer.json'在symfony2中,你所在的位置在哪里?对不起,大声笑 –
他正在谈论位于项目根文件夹中的那个。你的主依赖文件 - 其他文件是由包本身提供的文件。 – nifr