From 12cfb99e65fbb5be5e6a4a8538c34c85d9661330 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 31 Mar 2026 11:44:47 +0200 Subject: [PATCH 1/2] Fix deprecation on PHP 8.5 --- lib/RequestClient/CurlRequestClient.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/RequestClient/CurlRequestClient.php b/lib/RequestClient/CurlRequestClient.php index 581249df..c5d5ea24 100644 --- a/lib/RequestClient/CurlRequestClient.php +++ b/lib/RequestClient/CurlRequestClient.php @@ -113,14 +113,18 @@ private function execute($opts) if ($result === false) { $errno = \curl_errno($curl); $msg = \curl_error($curl); - \curl_close($curl); + if (PHP_VERSION_ID < 80500) { + \curl_close($curl); + } throw new GenericException($msg, ["curlErrno" => $errno]); } else { // Unsure how versions of cURL and PHP correlate so using the legacy // reference for getting the last response code $statusCode = \curl_getinfo($curl, \CURLINFO_RESPONSE_CODE); - \curl_close($curl); + if (PHP_VERSION_ID < 80500) { + \curl_close($curl); + } return [$result, $headers, $statusCode]; } From 08698a79e3f5b8e95dcfac6d41f67d9803536258 Mon Sep 17 00:00:00 2001 From: Vincent Langlet Date: Tue, 31 Mar 2026 11:46:39 +0200 Subject: [PATCH 2/2] PHP 8 --- lib/RequestClient/CurlRequestClient.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/RequestClient/CurlRequestClient.php b/lib/RequestClient/CurlRequestClient.php index c5d5ea24..75b15770 100644 --- a/lib/RequestClient/CurlRequestClient.php +++ b/lib/RequestClient/CurlRequestClient.php @@ -113,7 +113,7 @@ private function execute($opts) if ($result === false) { $errno = \curl_errno($curl); $msg = \curl_error($curl); - if (PHP_VERSION_ID < 80500) { + if (PHP_VERSION_ID < 80000) { \curl_close($curl); } @@ -122,7 +122,7 @@ private function execute($opts) // Unsure how versions of cURL and PHP correlate so using the legacy // reference for getting the last response code $statusCode = \curl_getinfo($curl, \CURLINFO_RESPONSE_CODE); - if (PHP_VERSION_ID < 80500) { + if (PHP_VERSION_ID < 80000) { \curl_close($curl); }