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
-------
e2fce0d89f
[FrameworkBundle] Do not pass the base uri twice to scoped http clients
This commit is contained in:
commit
943cbd804e
@ -2009,9 +2009,12 @@ class FrameworkExtension extends Extension
|
|||||||
unset($scopeConfig['scope']);
|
unset($scopeConfig['scope']);
|
||||||
|
|
||||||
if (null === $scope) {
|
if (null === $scope) {
|
||||||
|
$baseUri = $scopeConfig['base_uri'];
|
||||||
|
unset($scopeConfig['base_uri']);
|
||||||
|
|
||||||
$container->register($name, ScopingHttpClient::class)
|
$container->register($name, ScopingHttpClient::class)
|
||||||
->setFactory([ScopingHttpClient::class, 'forBaseUri'])
|
->setFactory([ScopingHttpClient::class, 'forBaseUri'])
|
||||||
->setArguments([new Reference($httpClientId), $scopeConfig['base_uri'], $scopeConfig])
|
->setArguments([new Reference($httpClientId), $baseUri, $scopeConfig])
|
||||||
->addTag('http_client.client')
|
->addTag('http_client.client')
|
||||||
;
|
;
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user