diff --git a/CHANGELOG.md b/CHANGELOG.md index 633df58e..f9e58c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" between each release. +# UNRELEASED + +- Added support for [Target attribute](https://symfony.com/blog/new-in-symfony-5-3-service-autowiring-with-attributes) + available in Symfony 5.3 + # 1.20.1 - 2021-02-12 - Added `kernel.reset` tag to the Collector. diff --git a/src/DependencyInjection/HttplugExtension.php b/src/DependencyInjection/HttplugExtension.php index 5fd60376..ffc30356 100644 --- a/src/DependencyInjection/HttplugExtension.php +++ b/src/DependencyInjection/HttplugExtension.php @@ -381,6 +381,10 @@ private function configureClient(ContainerBuilder $container, $clientName, array { $serviceId = 'httplug.client.'.$clientName; + if (method_exists($container, 'registerAliasForArgument')) { + $container->registerAliasForArgument($serviceId, HttpClient::class, $clientName); + } + $plugins = []; foreach ($arguments['plugins'] as $plugin) { $pluginName = key($plugin);