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:
Fabien Potencier 2016-01-25 08:32:08 +01:00
commit 4cc91ec2f7
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')