Skip to content

Commit

Permalink
[FrameworkBundle] Do not pass the base uri twice to scoped http clients
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyweb committed Aug 27, 2020
1 parent 166b795 commit 33bb058
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion DependencyInjection/FrameworkExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -2009,9 +2009,12 @@ private function registerHttpClientConfiguration(array $config, ContainerBuilder
unset($scopeConfig['scope']);

if (null === $scope) {
$baseUri = $scopeConfig['base_uri'];
unset($scopeConfig['base_uri']);

$container->register($name, ScopingHttpClient::class)
->setFactory([ScopingHttpClient::class, 'forBaseUri'])
->setArguments([new Reference($httpClientId), $scopeConfig['base_uri'], $scopeConfig])
->setArguments([new Reference($httpClientId), $baseUri, $scopeConfig])
->addTag('http_client.client')
;
} else {
Expand Down

0 comments on commit 33bb058

Please sign in to comment.