From e6f1f22accfd95f446e9c295997d9dd319bc9c33 Mon Sep 17 00:00:00 2001 From: davidburns Date: Wed, 16 Sep 2026 16:22:38 +1000 Subject: [PATCH] Allow PHP 8.4 and 8.5 php constraint widened to <8.6 and the CI matrix runs on the new versions. Suite passes on PHP 8.5 locally with the same job the workflow runs (the rexlabs dependencies' own php caps ignored until their releases land). Implicitly nullable parameters, deprecated since PHP 8.4, are declared nullable where the suite raised them. CHANGELOG entry for 4.2.0. Co-Authored-By: Claude Fable 5.1 --- .github/workflows/pr_test.yml | 4 ++-- CHANGELOG.md | 4 ++++ composer.json | 2 +- src/Exceptions/ApiException.php | 2 +- src/Hyper.php | 4 ++-- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_test.yml b/.github/workflows/pr_test.yml index 9f66915..94c85e6 100644 --- a/.github/workflows/pr_test.yml +++ b/.github/workflows/pr_test.yml @@ -11,11 +11,11 @@ jobs: strategy: fail-fast: false matrix: - php: ["7.4", "8.0", "8.1", "8.2", "8.3"] + php: ["7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5"] composer-version: [prefer-lowest, prefer-stable] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install dependencies run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 22f6fad..b273047 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # CHANGELOG +## 4.2.0 +* Add support for PHP 8.4, 8.5 +* Implicitly nullable parameters (deprecated in PHP 8.4) are declared nullable + ## 4.0.0 - Add support for PHP 8.0, 8.1, 8.2 diff --git a/composer.json b/composer.json index 738e18c..adc4f2b 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "php": ">=7.4 <8.4", + "php": ">=7.4 <8.6", "psr/log": "^1.0 || ^2.0 || ^3.0", "rexlabs/utility-belt": "^4.0", "guzzlehttp/guzzle": "^7.0", diff --git a/src/Exceptions/ApiException.php b/src/Exceptions/ApiException.php index b168501..317469e 100644 --- a/src/Exceptions/ApiException.php +++ b/src/Exceptions/ApiException.php @@ -28,7 +28,7 @@ class ApiException extends \RuntimeException * @param int $code * @param \Throwable|null $previous */ - public function __construct($message, $code = 0, \Throwable $previous = null) + public function __construct($message, $code = 0, ?\Throwable $previous = null) { parent::__construct($message, $code, $previous); diff --git a/src/Hyper.php b/src/Hyper.php index 972882e..18192fc 100644 --- a/src/Hyper.php +++ b/src/Hyper.php @@ -55,7 +55,7 @@ class Hyper * * @return Client */ - public static function make(array $config = [], GuzzleClient $guzzle = null, LoggerInterface $logger = null): Client + public static function make(array $config = [], ?GuzzleClient $guzzle = null, ?LoggerInterface $logger = null): Client { $config = array_replace_recursive(self::$defaultConfig, $config); $guzzleConfig = $config['guzzle'] ?? []; @@ -188,7 +188,7 @@ protected static function getBaseUri() * * @return Client */ - public static function instance(array $config = [], GuzzleClient $guzzle = null, LoggerInterface $logger = null): Client + public static function instance(array $config = [], ?GuzzleClient $guzzle = null, ?LoggerInterface $logger = null): Client { if (!array_key_exists(static::class, self::$instances)) { static::$instances[static::class] = static::make($config, $guzzle, $logger);