From d9b3686039321c7aea0b96e5304d28d473801198 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 6 Jun 2025 10:17:19 +0200 Subject: [PATCH] fix: suppress Guzzle warning about deprecated method --- lib/Http/GuzzleHttpClient.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Http/GuzzleHttpClient.php b/lib/Http/GuzzleHttpClient.php index 7dc29d239..765fe5c4d 100644 --- a/lib/Http/GuzzleHttpClient.php +++ b/lib/Http/GuzzleHttpClient.php @@ -2,6 +2,7 @@ namespace Algolia\AlgoliaSearch\Http; +use GuzzleHttp\Utils; use Algolia\AlgoliaSearch\Http\Psr7\Response; use GuzzleHttp\Client as GuzzleClient; use GuzzleHttp\Exception\ConnectException; @@ -44,7 +45,7 @@ public function sendRequest( private static function buildClient(array $config = []) { - $handlerStack = new HandlerStack(\GuzzleHttp\choose_handler()); + $handlerStack = new HandlerStack(Utils::chooseHandler()); $handlerStack->push(Middleware::prepareBody(), 'prepare_body'); $config = array_merge(['handler' => $handlerStack], $config);