Skip to content

Commit

Permalink
Fixed Elasticsearch Factory logger injection
Browse files Browse the repository at this point in the history
  • Loading branch information
Radiergummi committed Jun 11, 2024
1 parent a2f3bc6 commit 5eaac70
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ElasticsearchServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ protected function registerClientFactory(): void
ClientFactory::class
);

$this->app->when(ClientFactoryInterface::class)
->needs(LoggerInterface::class)
->give('elasticsearch.logger');
$this->app->bind(ClientFactory::class, fn(Application $app) => new ClientFactory(
$app->make('elasticsearch.logger')
));

$this->app->alias(
ClientFactoryInterface::class,
Expand Down

0 comments on commit 5eaac70

Please sign in to comment.