From f4dfee3beaabf7858361243296df0f3b00838958 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Thu, 4 Jun 2015 12:31:30 +0200 Subject: [PATCH] Improve the config validation in TwigBundle --- .../TwigBundle/DependencyInjection/Configuration.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php index 8cc114ab29..30c6f6ffab 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php @@ -129,13 +129,13 @@ class Configuration implements ConfigurationInterface ->end() ->scalarNode('autoescape_service')->defaultNull()->end() ->scalarNode('autoescape_service_method')->defaultNull()->end() - ->scalarNode('base_template_class')->example('Twig_Template')->end() + ->scalarNode('base_template_class')->example('Twig_Template')->cannotBeEmpty()->end() ->scalarNode('cache')->defaultValue('%kernel.cache_dir%/twig')->end() ->scalarNode('charset')->defaultValue('%kernel.charset%')->end() - ->scalarNode('debug')->defaultValue('%kernel.debug%')->end() - ->scalarNode('strict_variables')->end() + ->booleanNode('debug')->defaultValue('%kernel.debug%')->end() + ->booleanNode('strict_variables')->end() ->scalarNode('auto_reload')->end() - ->scalarNode('optimizations')->end() + ->integerNode('optimizations')->min(-1)->end() ->arrayNode('paths') ->normalizeKeys(false) ->useAttributeAsKey('paths')