diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 95aa34c50ef74..72485734a2995 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -53,6 +53,26 @@ public function getConfigTreeBuilder() return $v; }) ->end() + ->validate() + ->ifTrue(function ($v) { return !isset($v['assets']); }) + ->then(function ($v) { + if (!$v['templating']['assets_version'] + && !count($v['templating']['assets_base_urls']['http']) + && !count($v['templating']['assets_base_urls']['ssl']) + && !count($v['templating']['packages']) + ) { + $v['assets'] = array( + 'version' => null, + 'version_format' => '%%s?%%s', + 'base_path' => '', + 'base_urls' => array(), + 'packages' => array(), + ); + } + + return $v; + }) + ->end() ->validate() ->ifTrue(function ($v) { return isset($v['templating']); }) ->then(function ($v) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php index bbe54e9eb6a67..83b8a95602828 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php @@ -145,6 +145,13 @@ protected static function getBundleDefaultConfig() 'magic_call' => false, 'throw_exception_on_invalid_index' => false, ), + 'assets' => array( + 'version' => null, + 'version_format' => '%%s?%%s', + 'base_path' => '', + 'base_urls' => array(), + 'packages' => array(), + ), ); } } diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 6d57657ef10d3..485051c4cd5c4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -17,6 +17,7 @@ ], "require": { "php": ">=5.3.9", + "symfony/asset": "~2.7|~3.0.0", "symfony/dependency-injection" : "~2.6,>=2.6.2", "symfony/config" : "~2.4", "symfony/event-dispatcher": "~2.5|~3.0.0", @@ -48,7 +49,6 @@ "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" }, "suggest": { - "symfony/asset": "", "symfony/console": "For using the console commands", "symfony/finder": "For using the translation loader and cache warmer", "symfony/form": "For using forms",
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: