Skip to content

Commit 887f9d1

Browse files
xabbuhfabpot
authored andcommitted
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.
1 parent cd2048b commit 887f9d1

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

DependencyInjection/Configuration.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ public function getConfigTreeBuilder()
4343
$rootNode = $treeBuilder->root('framework');
4444

4545
$rootNode
46+
->beforeNormalization()
47+
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']); })
48+
->then(function ($v) {
49+
$v['assets'] = array();
50+
51+
return $v;
52+
})
53+
->end()
4654
->children()
4755
->scalarNode('secret')->end()
4856
->scalarNode('http_method_override')

0 commit comments

Comments
 (0)