Improve the config validation in TwigBundle

This commit is contained in:
Christophe Coevoet 2015-06-04 12:31:30 +02:00
parent 5607f71079
commit f4dfee3bea
1 changed files with 4 additions and 4 deletions

View File

@ -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')