futtern/config/packages/twig.php

18 lines
541 B
PHP
Raw Permalink Normal View History

2024-06-10 20:23:36 +02:00
<?php declare(strict_types=1);
2024-06-10 20:22:44 +02:00
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$containerConfigurator->extension('twig', [
'file_name_pattern' => '*.twig',
2024-07-10 23:39:28 +02:00
'globals' => [
'favicon' => '@App\Service\Favicon',
],
2024-06-10 20:22:44 +02:00
]);
if ($containerConfigurator->env() === 'test') {
$containerConfigurator->extension('twig', [
'strict_variables' => true,
]);
}
};