Skip to content

Commit 270d2ed

Browse files
committed
Merge branch '5.1'
* 5.1: Fix CS [HttpClient][MockHttpClient][DX] Throw when the response factory callable does not return a valid response [FrameworkBundle] Do not pass the base uri twice to scoped http clients
2 parents 355abf1 + abbb379 commit 270d2ed

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

DependencyInjection/FrameworkExtension.php

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

19931993
if (null === $scope) {
1994+
$baseUri = $scopeConfig['base_uri'];
1995+
unset($scopeConfig['base_uri']);
1996+
19941997
$container->register($name, ScopingHttpClient::class)
19951998
->setFactory([ScopingHttpClient::class, 'forBaseUri'])
1996-
->setArguments([new Reference($httpClientId), $scopeConfig['base_uri'], $scopeConfig])
1999+
->setArguments([new Reference($httpClientId), $baseUri, $scopeConfig])
19972000
->addTag('http_client.client')
19982001
;
19992002
} else {

0 commit comments

Comments
 (0)