Skip to content

Commit

Permalink
Have client builder return client interface
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Richter committed Dec 9, 2024
1 parent 4ab1cae commit 554c3e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Classes/Common/ElasticClientBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Illuminate\Support\Collection;
use Elastic\Elasticsearch\Client;
use Elastic\Elasticsearch\ClientInterface;
use Elastic\Elasticsearch\ClientBuilder;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
use TYPO3\CMS\Core\Utility\GeneralUtility;
Expand All @@ -24,9 +24,9 @@ class ElasticClientBuilder extends ClientBuilder {
protected array $hosts;
protected string $password;

public static function getClient(): Client
public static function getClient(): ClientInterface
{
return parent::create()->
return GeneralUtility::makeInstance(self::class)->
initialize()->
autoconfig()->
build();
Expand Down

0 comments on commit 554c3e7

Please sign in to comment.