Skip to content

Commit

Permalink
Fixed DI
Browse files Browse the repository at this point in the history
  • Loading branch information
slischka committed Feb 7, 2023
1 parent 09ffe8d commit cfa2f8e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Fapi/HttpClient/Bridges/NetteDI/HttpClientExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand All @@ -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'))
Expand Down

0 comments on commit cfa2f8e

Please sign in to comment.