Skip to content

Commit

Permalink
Merge pull request #128 from Jeroen-G/fix-binding
Browse files Browse the repository at this point in the history
Fix elastic client builder binding
  • Loading branch information
Jeroen-G authored Oct 31, 2022
2 parents 2945fdc + 44ea512 commit dbe2531
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
5 changes: 5 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [3.3.1]

### Fixes
- Bug returned class in Elastic client binding in the service provider.

## [3.3]

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/ExplorerServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function boot(): void
}

$this->app->bind(ElasticClientFactory::class, function () {
return ElasticClientBuilder::fromConfig(config())->build();
return new ElasticClientFactory(ElasticClientBuilder::fromConfig(config())->build());
});

$this->app->bind(IndexAdapterInterface::class, ElasticIndexAdapter::class);
Expand Down
1 change: 0 additions & 1 deletion src/Infrastructure/Elastic/ElasticClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ public static function fromConfig(Repository $config): ClientBuilder
{
$builder = ClientBuilder::create();


$hostConnectionProperties = array_filter(
$config->get('explorer.connection'),
static fn ($key) => in_array($key, self::HOST_KEYS, true),
Expand Down

0 comments on commit dbe2531

Please sign in to comment.