diff --git a/DependencyInjection/Compiler/ExtensionPass.php b/DependencyInjection/Compiler/ExtensionPass.php index 641c5df1..c4bd1d37 100644 --- a/DependencyInjection/Compiler/ExtensionPass.php +++ b/DependencyInjection/Compiler/ExtensionPass.php @@ -42,5 +42,9 @@ public function process(ContainerBuilder $container) if ($container->has('fragment.handler')) { $container->getDefinition('twig.extension.httpkernel')->addTag('twig.extension'); } + + if ($container->has('request_stack')) { + $container->getDefinition('twig.extension.httpfoundation')->addTag('twig.extension'); + } } } diff --git a/Resources/config/twig.xml b/Resources/config/twig.xml index 5f9fa050..40dbaa9f 100644 --- a/Resources/config/twig.xml +++ b/Resources/config/twig.xml @@ -103,6 +103,9 @@ + + +