diff --git a/src/Fapi/HttpClient/Bridges/NetteDI/HttpClientExtension.php b/src/Fapi/HttpClient/Bridges/NetteDI/HttpClientExtension.php index a870170..76533e8 100644 --- a/src/Fapi/HttpClient/Bridges/NetteDI/HttpClientExtension.php +++ b/src/Fapi/HttpClient/Bridges/NetteDI/HttpClientExtension.php @@ -40,7 +40,8 @@ public function loadConfiguration(): void if ($config['bar']) { $container->addDefinition($this->prefix('barHttpClient')) - ->setType($httpClientClass) + ->setFactory($httpClientClass) + ->setType(IHttpClient::class) ->setAutowired(false); $container->addDefinition($this->prefix('httpClient')) @@ -54,7 +55,8 @@ public function loadConfiguration(): void if ($config['logging']) { $container->addDefinition($this->prefix('loggingHttpClient')) - ->setType($httpClientClass) + ->setFactory($httpClientClass) + ->setType(IHttpClient::class) ->setAutowired(false); $container->addDefinition($this->prefix('tracyToPsrLogger'))