enable assets when templates are enabled

This puts back the default behavior of Symfony 2.8 where the Asset
component features were implicitly configured with sensible default
values when no explicit configuration was present but the templating
section was enabled.
This commit is contained in:
Christian Flothmann 2016-01-23 18:07:23 +01:00 committed by Fabien Potencier
parent 65e378d01b
commit d0de425072
1 changed files with 8 additions and 0 deletions

View File

@ -43,6 +43,14 @@ class Configuration implements ConfigurationInterface
$rootNode = $treeBuilder->root('framework');
$rootNode
->beforeNormalization()
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']); })
->then(function ($v) {
$v['assets'] = array();
return $v;
})
->end()
->children()
->scalarNode('secret')->end()
->scalarNode('http_method_override')