Skip to content

Commit fb52078

Browse files
committed
merged branch schmittjoh/configFix (PR #2197)
Commits ------- 83199ae [FrameworkBundle] Fix unintuitive merging behavior for assets_base_urls 4061114 [FrameworkBundle] fixes unintuitive merging behavior Discussion ---------- [FrameworkBundle] fixes unintuitive merging behavior --------------------------------------------------------------------------- by fabpot at 2011/09/16 10:04:53 -0700 I think this is a "bug", no? If this is the case, then we need to fix the 2.0 branch. --------------------------------------------------------------------------- by schmittjoh at 2011/09/17 00:34:14 -0700 It is a change in behavior, but whether or how you want to merge this is really up to you. --------------------------------------------------------------------------- by jmikola at 2011/09/19 08:09:26 -0700 I was about to create a PR for this very same quirk, as this was causing my CDN's for various environments to all get merged together. I think we can get away with merging it directly to 2.0 since `assets_base_urls` are hardly covered in the documentation at all. Once this gets merged, I wouldn't mind writing up a blurb on them to explain how the shorthand syntax works and this merging strategy. --------------------------------------------------------------------------- by jmikola at 2011/09/19 08:28:21 -0700 I just noticed this PR only fixes the `base_urls` config option under `packages`. We should also correct this behavior for `assets_base_urls`, which appears further up in FrameworkBundle's Configuration.php file. --------------------------------------------------------------------------- by jmikola at 2011/09/19 08:44:57 -0700 @schmittjoh: I have the second commit for this sitting in https://github.com/jmikola/symfony/tree/configFix (rebased on your branch) if you'd prefer to merge that into your branch to update this PR. --------------------------------------------------------------------------- by schmittjoh at 2011/09/19 08:55:42 -0700 Merged it in. Thanks. --------------------------------------------------------------------------- by fabpot at 2011/09/19 09:01:27 -0700 ok, I'm going to merge this into master. @jmikola: Can you submit documentation for the new way?
2 parents 2bb39c7 + 3b212cb commit fb52078

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

DependencyInjection/Configuration.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
226226
->fixXmlConfig('assets_base_url')
227227
->children()
228228
->arrayNode('assets_base_urls')
229+
->performNoDeepMerging()
229230
->addDefaultsIfNotSet()
230231
->defaultValue(array('http' => array(), 'ssl' => array()))
231232
->beforeNormalization()
@@ -279,6 +280,7 @@ private function addTemplatingSection(ArrayNodeDefinition $rootNode)
279280
->scalarNode('version')->defaultNull()->end()
280281
->scalarNode('version_format')->defaultValue('%%s?%%s')->end()
281282
->arrayNode('base_urls')
283+
->performNoDeepMerging()
282284
->addDefaultsIfNotSet()
283285
->defaultValue(array('http' => array(), 'ssl' => array()))
284286
->beforeNormalization()

0 commit comments

Comments
 (0)