minor #24172 [FrameworkBundle] Enable assets with templates only if the Asset component is installed (hason)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Enable assets with templates only if the Asset component is installed

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        | -

Commits
-------

5bc0b0527e [FrameworkBundle] Enable assets with templates only if the Asset component is installed
This commit is contained in:
Fabien Potencier 2017-09-26 21:32:04 -07:00
commit 3c262bab75

View File

@ -52,7 +52,7 @@ class Configuration implements ConfigurationInterface
$rootNode
->beforeNormalization()
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']); })
->ifTrue(function ($v) { return !isset($v['assets']) && isset($v['templating']) && class_exists(Package::class); })
->then(function ($v) {
$v['assets'] = array();