|
3 | 3 | namespace Http\HttplugBundle\DependencyInjection;
|
4 | 4 |
|
5 | 5 | use Http\Client\Common\BatchClient;
|
| 6 | +use Http\Client\Common\BatchClientImpl; |
6 | 7 | use Http\Client\Common\FlexibleHttpClient;
|
7 | 8 | use Http\Client\Common\HttpMethodsClient;
|
| 9 | +use Http\Client\Common\HttpMethodsClientImpl; |
8 | 10 | use Http\Client\Common\Plugin\AuthenticationPlugin;
|
9 | 11 | use Http\Client\Common\PluginClient;
|
10 | 12 | use Http\Client\Common\PluginClientFactory;
|
@@ -362,17 +364,19 @@ function ($id) {
|
362 | 364 | }
|
363 | 365 |
|
364 | 366 | if ($arguments['http_methods_client']) {
|
| 367 | + $fqn = class_exists(HttpMethodsClientImpl::class) ? HttpMethodsClientImpl::class : HttpMethodsClient::class; |
365 | 368 | $container
|
366 |
| - ->register($serviceId.'.http_methods', HttpMethodsClient::class) |
| 369 | + ->register($serviceId.'.http_methods', $fqn) |
367 | 370 | ->setArguments([new Reference($serviceId.'.http_methods.inner'), new Reference('httplug.message_factory')])
|
368 | 371 | ->setPublic($arguments['public'] ? true : false)
|
369 | 372 | ->setDecoratedService($serviceId)
|
370 | 373 | ;
|
371 | 374 | }
|
372 | 375 |
|
373 | 376 | if ($arguments['batch_client']) {
|
| 377 | + $fqn = class_exists(BatchClientImpl::class) ? BatchClientImpl::class : BatchClient::class; |
374 | 378 | $container
|
375 |
| - ->register($serviceId.'.batch_client', BatchClient::class) |
| 379 | + ->register($serviceId.'.batch_client', $fqn) |
376 | 380 | ->setArguments([new Reference($serviceId.'.batch_client.inner')])
|
377 | 381 | ->setPublic($arguments['public'] ? true : false)
|
378 | 382 | ->setDecoratedService($serviceId)
|
|
0 commit comments