You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
* Registers the Twig exception listener if Twig is registered as a templating engine.
@@ -31,13 +30,17 @@ public function process(ContainerBuilder $container)
31
30
}
32
31
33
32
// to be removed in 5.0
34
-
// register the exceptioncontroller only ifTwig is enabled and required dependencies do exist
35
-
if (!interface_exists(EventSubscriberInterface::class) ||$container->hasDefinition('exception_listener')) {
33
+
// register the exceptionlistener only ifit's currently used, else use the provided by FrameworkBundle
34
+
if ('twig.controller.exception::showAction' ===$container->getParameter('twig.exception_listener.controller') &&$container->hasDefinition('exception_listener')) {