From eeb3e51cd3e97a99ac917fdf84076a419cb81c16 Mon Sep 17 00:00:00 2001 From: drkjc Date: Mon, 19 Oct 2026 13:25:45 -0400 Subject: [PATCH] fix: remove the curl_close() call deprecated in PHP 8.5 --- .github/workflows/ci.yml | 2 +- phpunit.xml | 5 ++++- src/Utilities.php | 4 +--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f6fb01f..227cf3b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: # Mirror the `php` floor in composer.json (>=8.2) through current stable. - php-version: ["8.2", "8.3", "8.4"] + php-version: ["8.2", "8.3", "8.4", "8.5"] steps: # The official images ship without git/unzip, which checkout and Composer use. - name: Install system packages diff --git a/phpunit.xml b/phpunit.xml index 5a126ec..1c854f6 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -3,7 +3,10 @@ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.0/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true" - cacheDirectory=".phpunit.cache"> + cacheDirectory=".phpunit.cache" + failOnDeprecation="true" + failOnWarning="true" + failOnNotice="true"> tests diff --git a/src/Utilities.php b/src/Utilities.php index a49e133..a77afc2 100644 --- a/src/Utilities.php +++ b/src/Utilities.php @@ -109,9 +109,7 @@ public static function makeRequest( $response = curl_exec($ch); $statusCode = curl_getinfo($ch, CURLINFO_HTTP_CODE); $error = curl_error($ch); - - curl_close($ch); - + if ($error) { Logger::error('There was an error making a request.', $error)->log(); return [