From 33bb058c5e3cb57b552253e2082c97765ff8419c Mon Sep 17 00:00:00 2001 From: Thomas Calvet Date: Thu, 27 Aug 2020 18:01:08 +0200 Subject: [PATCH] [FrameworkBundle] Do not pass the base uri twice to scoped http clients --- DependencyInjection/FrameworkExtension.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DependencyInjection/FrameworkExtension.php b/DependencyInjection/FrameworkExtension.php index 9f970ce02..8483898d1 100644 --- a/DependencyInjection/FrameworkExtension.php +++ b/DependencyInjection/FrameworkExtension.php @@ -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 {