Skip to content

Commit 5251e64

Browse files
committed
Merge pull request #45 from php-http/default-bugifx
Bugfix, circular reference with client named 'default'
2 parents b27c849 + 23ab800 commit 5251e64

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

DependencyInjection/HttplugExtension.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@ private function configureClients(ContainerBuilder $container, array $config)
8989
}
9090
}
9191

92-
// Alias the first client to httplug.client.default
92+
// If we have clients configured
9393
if ($first !== null) {
94-
$container->setAlias('httplug.client.default', 'httplug.client.'.$first);
94+
if ($first !== 'default') {
95+
// Alias the first client to httplug.client.default
96+
$container->setAlias('httplug.client.default', 'httplug.client.'.$first);
97+
}
9598
} elseif (isset($config['_inject_collector_plugin'])) {
9699
// No client was configured. Make sure to inject history plugin to the auto discovery client.
97100
$container->register('httplug.client', PluginClient::class)

0 commit comments

Comments
 (0)