0

again i have a problem with my first symfony project. I'll try to install SonataMediaBundle. I have install SonataAdminBundle and it works fine. I do everythink with that instruction https://sonata-project.org/bundles/media/3-x/doc/reference/installation.html but in point when i need to add line to AppKernel

new Application\Sonata\MediaBundle\ApplicationSonataMediaBundle(),

When try to update my database schema i have an error:

Uncaught ClassNotFoundException Ateempted to load class "ApplicationSonataMediaBundle" from namepace "Application\Sonata\MediaBundle". Did you forget to use statement for another namespace? In my project/src i have AppBundle and Application directory. Why i have this error? and MediaBundle need ClassificationBundle to work property?

2
  • You just need to adjust the autoload section of composer.json. Commented Aug 17, 2017 at 12:12
  • You need to generate YOUR Custom Extended MediaBundle using following command: php app/console sonata:easy-extends:generate --dest=src SonataMediaBundle and register generated Bundle in AppKernel.php Commented Aug 18, 2017 at 21:26

1 Answer 1

0

Check if the name of the bundle exist in composer.json

  "require": {
            "php": ">=5.5.9",
            "doctrine/doctrine-bundle": "^1.6",
             "yourbundle"

Then update composer :

php composer.phar update
php composer.phar require
Sign up to request clarification or add additional context in comments.

2 Comments

You need to generate YOUR Custom Extended MediaBundle using following command: php app/console sonata:easy-extends:generate --dest=src SonataMediaBundle and register generated Bundle in AppKernel.php
Yes,that may solve his issue but i guess he just fixed it and left Stackoverflow

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.