8000 minor #37967 [FrameworkBundle] Do not pass the base uri twice to scop… · symfony/symfony@943cbd8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 943cbd8

Browse files
committed
minor #37967 [FrameworkBundle] Do not pass the base uri twice to scoped http clients (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle] Do not pass the base uri twice to scoped http clients | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - I looked at my dumped scoped http client PHP file and I noticed the base uri was passed two times. I thought there was a bug somewhere in my configuration. Actually, we only need to pass it as the method argument here. Commits ------- e2fce0d [FrameworkBundle] Do not pass the base uri twice to scoped http clients
2 parents 4dc9ac0 + e2fce0d commit 943cbd8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2009,9 +2009,12 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder
20092009
unset($scopeConfig['scope']);
20102010

20112011
if (null === $scope) {
2012+
$baseUri = $scopeConfig['base_uri'];
2013+
unset($scopeConfig['base_uri']);
2014+
20122015
$container->register($name, ScopingHttpClient::class)
20132016
->setFactory([ScopingHttpClient::class, 'forBaseUri'])
2014-
->setArguments([new Reference($httpClientId), $scopeConfig['base_uri'], $scopeConfig])
2017+
->setArguments([new Reference($httpClientId), $baseUri, $scopeConfig])
20152018
->addTag('http_client.client')
20162019
;
20172020
} else {

0 commit comments

Comments
 (0)
0