Symfony 安装FOSCommentBundle后发生InactiveScopeException

Symfony 安装FOSCommentBundle后发生InactiveScopeException,symfony,symfony-2.3,foscommentbundle,Symfony,Symfony 2.3,Foscommentbundle,我正在设置FOSCommentBundle,我按照所有步骤安装它。但是,我现在访问的任何页面都会出现以下异常: InactiveScopeException: You cannot create a service ("fos_comment.listener.thread_permalink") of an inactive scope ("request"). in C:\htdocs\click-na-ilha\app\cache\dev\appDevDebugProjectContain

我正在设置FOSCommentBundle,我按照所有步骤安装它。但是,我现在访问的任何页面都会出现以下异常:

InactiveScopeException: You cannot create a service
("fos_comment.listener.thread_permalink") of an inactive scope ("request").
in C:\htdocs\click-na-ilha\app\cache\dev\appDevDebugProjectContainer.php line 1595
at appDevDebugProjectContainer->getFosComment_Listener_ThreadPermalinkService() in C:\htdocs\click-na-ilha\app\bootstrap.php.cache line 1904
at Container->get('fos_comment.listener.thread_permalink') in C:\htdocs\click-na-ilha\app\cache\dev\classes.php line 1772
at ContainerAwareEventDispatcher->lazyLoad('fos_comment.thread.create') in C:\htdocs\click-na-ilha\app\cache\dev\classes.php line 1737
at ContainerAwareEventDispatcher->getListeners(null) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 107
at TraceableEventDispatcher->getListeners() in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 168
at TraceableEventDispatcher->getNotCalledListeners() in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 354
at TraceableEventDispatcher->saveInfoInProfile(object(Profile), false) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 328
at TraceableEventDispatcher->updateProfiles('05b179', false) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 431
at TraceableEventDispatcher->postDispatch('kernel.terminate', object(PostResponseEvent)) in C:\htdocs\click-na-ilha\vendor\symfony\symfony\src\Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher.php line 148
at TraceableEventDispatcher->dispatch('kernel.terminate', object(PostResponseEvent)) in C:\htdocs\click-na-ilha\app\bootstrap.php.cache line 2758
at HttpKernel->terminate(object(Request), object(Response)) in C:\htdocs\click-na-ilha\app\bootstrap.php.cache line 2159
at Kernel->terminate(object(Request), object(Response)) in C:\htdocs\click-na-ilha\web\app_dev.php line 32
这是我添加的代码


出什么问题了?

在将Symfony从2.1升级到2.2之后,我遇到了相同的异常。当内置调试工具栏尝试收集内核上所有未调用的侦听器时会发生这种情况。terminate事件,它会初始化容器作用域“request”的每个未调用侦听器,但作用域“request”在终止阶段不再处于活动状态。我找不到合适的方法来解决这个问题。