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,