diff --git a/src/DependencyInjection/TracyBlueScreenExtension.php b/src/DependencyInjection/TracyBlueScreenExtension.php index 45dcfe8..ad35220 100644 --- a/src/DependencyInjection/TracyBlueScreenExtension.php +++ b/src/DependencyInjection/TracyBlueScreenExtension.php @@ -26,7 +26,7 @@ final class TracyBlueScreenExtension extends ConfigurableExtension implements Pr public const CONTAINER_PARAMETER_CONSOLE_LISTENER_PRIORITY = 'cdn77.tracy_blue_screen.console.listener_priority'; public const CONTAINER_PARAMETER_CONSOLE_LOG_DIRECTORY = 'cdn77.tracy_blue_screen.console.log_directory'; public const CONTAINER_PARAMETER_CONTROLLER_LISTENER_PRIORITY = 'cdn77.tracy_blue_screen.controller.listener_priority'; - private const TWIG_BUNDLE_ALIAS = 'twig'; + public const TWIG_BUNDLE_ALIAS = 'twig'; private const TWIG_TEMPLATES_NAMESPACE = 'Twig'; public function prepend(ContainerBuilder $container) : void diff --git a/src/TracyBlueScreenBundle.php b/src/TracyBlueScreenBundle.php index 14181bd..a0444a6 100644 --- a/src/TracyBlueScreenBundle.php +++ b/src/TracyBlueScreenBundle.php @@ -4,8 +4,16 @@ namespace Cdn77\TracyBlueScreenBundle; +use Symfony\Bundle\TwigBundle\DependencyInjection\TwigExtension; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; final class TracyBlueScreenBundle extends Bundle { + public function build(ContainerBuilder $container) : void + { + parent::build($container); + + $container->registerExtension(new TwigExtension()); + } } diff --git a/tests/Cdn77/TracyBlueScreenBundle/TracyBlueScreenBundleTest.php b/tests/Cdn77/TracyBlueScreenBundle/TracyBlueScreenBundleTest.php new file mode 100644 index 0000000..eb2ae73 --- /dev/null +++ b/tests/Cdn77/TracyBlueScreenBundle/TracyBlueScreenBundleTest.php @@ -0,0 +1,21 @@ +build($containerBuilder); + + self::assertTrue($containerBuilder->hasExtension(TracyBlueScreenExtension::TWIG_BUNDLE_ALIAS)); + } +}