From 554c3e719bba6459b5102fdcac0d6625faeb82d2 Mon Sep 17 00:00:00 2001 From: Matthias Richter Date: Mon, 9 Dec 2024 11:27:22 +0100 Subject: [PATCH] Have client builder return client interface --- Classes/Common/ElasticClientBuilder.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Classes/Common/ElasticClientBuilder.php b/Classes/Common/ElasticClientBuilder.php index cd1c4df..32347e8 100644 --- a/Classes/Common/ElasticClientBuilder.php +++ b/Classes/Common/ElasticClientBuilder.php @@ -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; @@ -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();