From fd8ebb657e7daf64770fe99291a9ea370283b88b Mon Sep 17 00:00:00 2001 From: adumont-payplug Date: Thu, 11 Jun 2026 10:48:36 +0200 Subject: [PATCH] IT: updating CI to check PHP 8.5 compatibility --- lib/Payplug/Core/CurlRequest.php | 6 +++++- rector.php | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Payplug/Core/CurlRequest.php b/lib/Payplug/Core/CurlRequest.php index 0964829..ac300cb 100644 --- a/lib/Payplug/Core/CurlRequest.php +++ b/lib/Payplug/Core/CurlRequest.php @@ -49,7 +49,11 @@ public function exec() */ public function close() { - curl_close($this->_curl); + // curl_close() is a no-op since PHP 8.0 and deprecated in PHP 8.5. + // Calling it under PHP 8.5 with developer mode throws (deprecations -> exceptions). + if (PHP_VERSION_ID < 80000) { + curl_close($this->_curl); + } } /** diff --git a/rector.php b/rector.php index f065141..3ec7782 100644 --- a/rector.php +++ b/rector.php @@ -9,7 +9,7 @@ ->withPaths([ __DIR__ . '/lib', ]) - ->withPhpVersion(Rector\ValueObject\PhpVersion::PHP_84) + ->withPhpVersion(Rector\ValueObject\PhpVersion::PHP_85) ->withRules([ ExplicitNullableParamTypeRector::class, CompleteDynamicPropertiesRector::class,