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);