首页 文章

Symfony SonataNotificationBundle配置

提问于
浏览
1

对不起,如果问题很愚蠢,我对Symfony很新 . 安装后,包裹填充oficial documentation我收到一个错误:

致命错误:未捕获的Symfony \ Component \ Debug \ Exception \ ClassNotFoundException:尝试从命名空间“Application \ Sonata \ NotificationBundle”加载类“ApplicationSonataNotificationBundle” . 您是否忘记了另一个命名空间的“use”语句?在C:\ OpenServer \ domains \ tdserebro \ app \ AppKernel.php:41

AppKernel.php#41行是:

new Application\Sonata\NotificationBundle\ApplicationSonataNotificationBundle(),

那是什么让我“使用”?文档中没有类似的东西 . 如果这很重要,则类本身存储在app \ Application \ Sonata \ NotificationBundle \目录中(默认情况下) . Symfony版本是2.8

1 回答

  • 0

    默认的自动加载配置要求您的类 Application\Sonata\NotificationBundle 位于src / Application / Sonata / NotificationBundle /不在app /下 .

    重新配置自动加载器(您可以在composer.json中执行此操作),或者在src /下移动文件 .

相关问题