From 36f9814a9e0a08bd46b3fddb166966620dcd09f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Cybula?= Date: Fri, 12 Feb 2021 15:38:24 +0100 Subject: [PATCH] Use always available twig template loader to add custom paths --- DependencyInjection/Compiler/TemplatePathPass.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/DependencyInjection/Compiler/TemplatePathPass.php b/DependencyInjection/Compiler/TemplatePathPass.php index 166941e..efe475e 100644 --- a/DependencyInjection/Compiler/TemplatePathPass.php +++ b/DependencyInjection/Compiler/TemplatePathPass.php @@ -20,11 +20,7 @@ final class TemplatePathPass implements CompilerPassInterface { public function process(ContainerBuilder $container) { - if (true === $container->hasDefinition('twig.loader.native_filesystem')) { - $loaderDefinition = $container->getDefinition('twig.loader.native_filesystem'); - } else { - $loaderDefinition = $container->getDefinition('twig.loader.filesystem'); - } + $loaderDefinition = $container->getDefinition('twig.loader.native_filesystem'); $reflection = new ReflectionClass(DataSourceBundle::class); $loaderDefinition->addMethodCall(