2012-06-13 46 views
1

我试图通过使用命令来生成灯具:加载学说灯具

php app/console generate:fixtures:load 

它给了我这个错误:

The autoloader expected class "Doctrine\Bundle\DoctrineFixturesBundle\Doctrine 
FixturesBundle" to be defined in file "C:\wamp\www\SymfonyV1\app/../vendor/Bundl 
es\Doctrine\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle.php". The file 
was found but the class was not in it, the class name or namespace probably has 
a typo. 

我查塔类是存在的。

你知道如何解决这个问题吗?

谢谢

回答

0

错误不言自明。你忘了添加适当的命名空间声明到你的类文件吗?

1

我认为这是连接到DoctrineFixtures捆绑被从Symfony转移到github上的Doctrine。当我更新到2.0.15时,它引起了一些混乱。

DoctrineFixturesBundle.php文件应位于vendor/bundles/Symfony/Bundle/DoctrineFixturesBundle /中,并且具有名称空间Symfony \ Bundle \ DoctrineFixturesBundle。