Skip to content

Commit 5eaac70

Browse files
committed
Fixed Elasticsearch Factory logger injection
1 parent a2f3bc6 commit 5eaac70

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ElasticsearchServiceProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,9 @@ protected function registerClientFactory(): void
203203
ClientFactory::class
204204
);
205205

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

210210
$this->app->alias(
211211
ClientFactoryInterface::class,

0 commit comments

Comments
 (0)