当前位置: 动力学知识库 > 问答 > 编程问答 >

php - 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

网友答案:

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/.

分享给朋友:
您可能感兴趣的文章:
随机阅读: