From d416765a20e675278eca7e0dbb26fc2e273527da Mon Sep 17 00:00:00 2001 From: emanuelgomez-s1 Date: Wed, 7 May 2025 10:45:40 -0300 Subject: [PATCH] Compatibility with new version of guzzle (guzzle > 5.3.0 & PHP >= 8) --- src/Http/REST.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Http/REST.php b/src/Http/REST.php index c3d3270db..ade561dfb 100644 --- a/src/Http/REST.php +++ b/src/Http/REST.php @@ -90,10 +90,8 @@ public static function doExecute(ClientInterface $client, RequestInterface $requ $response = $e->getResponse(); // specific checking for Guzzle 5: convert to PSR7 response - if ( - interface_exists('\GuzzleHttp\Message\ResponseInterface') - && $response instanceof \GuzzleHttp\Message\ResponseInterface - ) { + // compatibility with new version of guzzle (guzzle > 5.3.0 & PHP >= 8) + if ($response instanceof ResponseInterface && !($response instanceof Response)) { $response = new Response( $response->getStatusCode(), $response->getHeaders() ?: [],