From faf2370a3d85a25225ee60b07b5fa4b428a90942 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 17 Dec 2016 19:04:40 +0100 Subject: [PATCH] removed obsolete condition --- .../DependencyInjection/Compiler/ExceptionListenerPass.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php index 711743a5af..be447ab33c 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExceptionListenerPass.php @@ -27,9 +27,7 @@ class ExceptionListenerPass implements CompilerPassInterface return; } - if (!interface_exists('Symfony\Component\Templating\TemplateReferenceInterface')) { - $container->removeDefinition('twig.controller.exception'); - } + $container->removeDefinition('twig.controller.exception'); // register the exception controller only if Twig is enabled and required dependencies do exist if (!class_exists('Symfony\Component\Debug\Exception\FlattenException') || !interface_exists('Symfony\Component\EventDispatcher\EventSubscriberInterface')) {