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
This commit is contained in:
commit
4cc91ec2f7
@ -43,6 +43,14 @@ class Configuration implements ConfigurationInterface
|
|||||||
$rootNode = $treeBuilder->root('framework');
|
$rootNode = $treeBuilder->root('framework');
|
||||||
|
|
||||||
$rootNode
|
$rootNode
|
||||||
|
->beforeNormalization()
|
||||||
|
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']); })
|
||||||
|
->then(function ($v) {
|
||||||
|
$v['assets'] = array();
|
||||||
|
|
||||||
|
return $v;
|
||||||
|
})
|
||||||
|
->end()
|
||||||
->children()
|
->children()
|
||||||
->scalarNode('secret')->end()
|
->scalarNode('secret')->end()
|
||||||
->scalarNode('http_method_override')
|
->scalarNode('http_method_override')
|
||||||
|
Reference in New Issue
Block a user