diff --git a/.github/workflows/payplug-ci.yml b/.github/workflows/payplug-ci.yml index 4e032a0..449dc27 100644 --- a/.github/workflows/payplug-ci.yml +++ b/.github/workflows/payplug-ci.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.3', '7.4', '8.0'] + php-versions: ['7.3', '7.4', '8.0', '8.5'] phpunit-versions: ['8.5.15'] include: - php-versions: '5.6' 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,