From 3c000341c133220981a840176e0afed9858e2b83 Mon Sep 17 00:00:00 2001 From: Albert Casdemont Date: Wed, 28 Nov 2018 12:44:00 +0100 Subject: [PATCH] Only register twig files when debugging --- Bootstraps/Symfony.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bootstraps/Symfony.php b/Bootstraps/Symfony.php index cf83321..748e696 100644 --- a/Bootstraps/Symfony.php +++ b/Bootstraps/Symfony.php @@ -150,7 +150,7 @@ public function postHandle($app) //Symfony\Bundle\TwigBundle\Loader\FilesystemLoader //->Twig_Loader_Filesystem - if ($container->has('twig.loader')) { + if ($this->debug && $container->has('twig.loader')) { $twigLoader = $container->get('twig.loader'); Utils::bindAndCall(function () use ($twigLoader) { foreach ($twigLoader->cache as $path) {