diff --git a/app/classes/ReleaseInsights/Template.php b/app/classes/ReleaseInsights/Template.php index 074596e..2cfaf1c 100644 --- a/app/classes/ReleaseInsights/Template.php +++ b/app/classes/ReleaseInsights/Template.php @@ -37,9 +37,18 @@ public function render(): void { // Initialize our Templating system $twig_loader = new FilesystemLoader(INSTALL_ROOT . 'app/views/templates'); - $twig = new Environment($twig_loader); - $twig->addExtension(new IntlExtension()); + // @codeCoverageIgnoreStart + // Allow Twig debug mode in local dev mode + if (LOCALHOST && !defined('TESTING_CONTEXT')) { + $twig = new Environment($twig_loader, ['debug' => true,]); + $twig->addExtension(new \Twig\Extension\DebugExtension()); + } else { + $twig = new Environment($twig_loader); + } + // @codeCoverageIgnoreEnd + + $twig->addExtension(new IntlExtension()); echo $twig->render($this->template, $this->data); } }