0

I'm creating a Project Under Symfony 3.4.2 I'm having a problem with the installation process of Sonata news Bundle.

I'm at the end of the Installation, when I'm running the command :

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

I'm having this message :

    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!

(So quite good^^)

then I add it to my AppKernel :

new Application\Sonata\NewsBundle\ApplicationSonataNewsBundle(),

And this to Sonata_news.yml

ApplicationSonataNewsBundle: ~

I'm having this error :

Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "ApplicationSonataNewsBundle" from namespace "Application\Sonata\NewsBundle".

Any idea how to fix it ?

Newbiedev
  • 141
  • 3
  • 20
  • I fixed by using this [solution](https://stackoverflow.com/questions/45630629/classnotfoundexception-attempted-to-load-class-fosuserbundle-from-namespace). – Newbiedev Jan 09 '18 at 10:00
  • 1
    The title of this post is a little misleading.. It references an error that is connected to doctrine-bundle version 1.6.8.. but the SonataNewsBundle error seems unrelated? If any one is searching for a solution for the platform version error, check this post out https://github.com/doctrine/DoctrineBundle/issues/673 – lsimonetti Oct 04 '18 at 13:36

0 Answers0