0

我正在 Symfony 3.4.2 下创建一个项目 我在安装 Sonata news Bundle 时遇到问题。

当我运行命令时,我在安装结束时:

php bin/console sonata:easy-extends:generate SonataNewsBundle -d src

我收到这条消息:

    Processing bundle : "SonataNewsBundle"
Processing Doctrine ORM : "SonataNewsBundle"
 - Copy entity files
   ~ Comment.orm.xml
   ~ Post.orm.xml
 - Generating entity files
   ~ Comment
   ~ Post
 - Generating entity repository files
   ! CommentRepository
   ~ PostRepository
Processing Doctrine ODM : "SonataNewsBundle"
 - Copy document files
   ~ Comment.mongodb.xml
   ~ Post.mongodb.xml
 - Generating document files
   ~ Comment
   ~ Post
 - Generating document repository files
   ! CommentRepository
   ~ PostRepository
Processing Doctrine PHPCR : "SonataNewsBundle"
 - Copy Document files
 - Generating Document files
 - Generating Document repository files
Processing Serializer config : "SonataNewsBundle"
 - Generating ORM serializer files
   ~ Comment
   ~ Post
 - Generating ODM serializer files
   ~ Comment
   ~ Post

done!

(太好了^^)

然后我将它添加到我的 AppKernel :

新应用程序\奏鸣曲\NewsBundle\ApplicationSonataNewsBundle(),

这给 Sonata_news.yml

ApplicationSonataNewsBundle: ~

我有这个错误:

未捕获的 Symfony\Component\Debug\Exception\ClassNotFoundException:试图从命名空间“Application\Sonata\NewsBundle”加载类“ApplicationSonataNewsBundle”。

知道如何解决吗?

4

0 回答 0