8000 bug #17506 [FrameworkBundle] enable assets when templates are enabled… · symfony/symfony@4cc91ec · GitHub
[go: up one dir, main page]

Skip to content

Commit 4cc91ec

Browse files
committed
bug #17506 [FrameworkBundle] enable assets when templates are enabled (xabbuh)
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes #17506). Discussion ---------- [FrameworkBundle] enable assets when templates are enabled | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16570 | License | MIT | Doc PR | 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. Commits ------- d0de425 enable assets when templates are enabled
2 parents 65e378d + d0de425 commit 4cc91ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/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)
0