2016-12-14 39 views
1

對不起,如果問題很蠢,我對Symfony來說很新。安裝後捆綁fillowing的oficial documentation我得到一個錯誤:Symfony SonataNotificationBundle配置

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

線AppKernel.php#41:

new Application\Sonata\NotificationBundle\ApplicationSonataNotificationBundle(), 

是什麼要我 「用」?文檔中沒有這樣的東西。 如果重要,該類本身存儲在app \ Application \ Sonata \ NotificationBundle \目錄中(默認情況下)。 Symfony的版本是2.8

+0

它無法識別新捆綁包,自動裝載器未能加載它可能是因爲它可以在供應商目錄中找到它。你應該檢查它是否存在。然後'rm -rf app/cache/* && rm -rf app/logs/*'然後重試。 – smarber

回答

0

默認自動加載配置預計的Application\Sonata\NotificationBundle類是的src /應用/索納塔/ NotificationBundle/不低於應用程序/

重新配置您的自動加載器(您可以在composer.json中做到這一點),或者將文件移動到src/下。