Vladimir Shevelyov
Vladimir Shevelyov

Reputation: 111

Symfony SonataNotificationBundle configuration

Sorry if the question is stupid, I'm pretty new to Symfony. After installation the bundle fillowing the oficial documentation I'm getting an error:

Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "ApplicationSonataNotificationBundle" from namespace "Application\Sonata\NotificationBundle". Did you forget a "use" statement for another namespace? in C:\OpenServer\domains\tdserebro\app\AppKernel.php:41

The line AppKernel.php#41 is:

new Application\Sonata\NotificationBundle\ApplicationSonataNotificationBundle(),

What does that want me to "use"? There wasn't anything like that in the documentation. In case that is important, the class itself stored in app\Application\Sonata\NotificationBundle\ directory(as default). Symfony version is 2.8

Upvotes: 1

Views: 247

Answers (1)

Michael Hirschler
Michael Hirschler

Reputation: 2518

The default autoload configuration expects your class Application\Sonata\NotificationBundle to be in src/Application/Sonata/NotificationBundle/ not under app/.

Either reconfigure your autoloader (you can do that in composer.json), or move your files under src/.

Upvotes: 0

Related Questions