Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
),
);
}
}
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down