Skip to content

Commit 85b6115

Browse files
committed
Deprecating "false" as default value of "strict_variable" under Twig configuration
1 parent 1df45e4 commit 85b6115

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php

+7-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,13 @@ private function addTwigOptions(ArrayNodeDefinition $rootNode)
127127
->scalarNode('cache')->defaultValue('%kernel.cache_dir%/twig')->end()
128128
->scalarNode('charset')->defaultValue('%kernel.charset%')->end()
129129
->booleanNode('debug')->defaultValue('%kernel.debug%')->end()
130-
->booleanNode('strict_variables')->end()
130+
->booleanNode('strict_variables')
131+
->defaultValue(function () {
132+
@trigger_error('No setting "strict_variables" to false is deprecated as of 4.1, it will be the value of the "kernel.debug" parameter by default in 5.0.', E_USER_DEPRECATED);
133+
134+
return false;
135+
})
136+
->end()
131137
->scalarNode('auto_reload')->end()
132138
->integerNode('optimizations')->min(-1)->end()
133139
->scalarNode('default_path')

0 commit comments

Comments
 (0)