From d0de4250723bbc9fdda3aaa09d1d4b7249fd9b3b Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 23 Jan 2016 18:07:23 +0100 Subject: [PATCH] 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. --- .../FrameworkBundle/DependencyInjection/Configuration.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index b2df7917a9..89f9fbbd57 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -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')