From edda41e95da0a0bbfd0ae5e0eae9daf62c416c2d Mon Sep 17 00:00:00 2001 From: Tom Arbesser-Rastburg Date: Sun, 29 Dec 2024 21:00:46 +1100 Subject: [PATCH] chore(platform): PHPMNT-177 Add PHP 8.4 to CircleCI test matrix --- .circleci/config.yml | 2 +- src/Dflydev/Hawk/Header/Header.php | 4 ++-- src/Dflydev/Hawk/Header/HeaderFactory.php | 4 ++-- src/Dflydev/Hawk/Header/HeaderParser.php | 2 +- src/Dflydev/Hawk/Server/UnauthorizedException.php | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 90c9e33..1538db4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ workflows: - php/phpunit-tests: matrix: parameters: - php-version: [ "8.0", "8.1", "8.2", "8.3" ] + php-version: [ "8.0", "8.1", "8.2", "8.3", "8.4" ] - php/composer-github: filters: tags: diff --git a/src/Dflydev/Hawk/Header/Header.php b/src/Dflydev/Hawk/Header/Header.php index e1c1916..d145f0a 100644 --- a/src/Dflydev/Hawk/Header/Header.php +++ b/src/Dflydev/Hawk/Header/Header.php @@ -8,7 +8,7 @@ class Header private $fieldValue; private $attributes; - public function __construct($fieldName, $fieldValue, array $attributes = null) + public function __construct($fieldName, $fieldValue, ?array $attributes = null) { $this->fieldName = $fieldName; $this->fieldValue = $fieldValue; @@ -25,7 +25,7 @@ public function fieldValue() return $this->fieldValue; } - public function attributes(array $keys = null) + public function attributes(?array $keys = null) { if (null === $keys) { return $this->attributes; diff --git a/src/Dflydev/Hawk/Header/HeaderFactory.php b/src/Dflydev/Hawk/Header/HeaderFactory.php index 1e511b0..9f3a1b6 100644 --- a/src/Dflydev/Hawk/Header/HeaderFactory.php +++ b/src/Dflydev/Hawk/Header/HeaderFactory.php @@ -4,7 +4,7 @@ class HeaderFactory { - public static function create($fieldName, array $attributes = null) + public static function create($fieldName, ?array $attributes = null) { $fieldValue = 'Hawk'; @@ -22,7 +22,7 @@ public static function create($fieldName, array $attributes = null) return new Header($fieldName, $fieldValue, $attributes); } - public static function createFromString($fieldName, $fieldValue, array $requiredKeys = null) + public static function createFromString($fieldName, $fieldValue, ?array $requiredKeys = null) { return static::create( $fieldName, diff --git a/src/Dflydev/Hawk/Header/HeaderParser.php b/src/Dflydev/Hawk/Header/HeaderParser.php index 3a91326..9197132 100644 --- a/src/Dflydev/Hawk/Header/HeaderParser.php +++ b/src/Dflydev/Hawk/Header/HeaderParser.php @@ -4,7 +4,7 @@ class HeaderParser { - public static function parseFieldValue($fieldValue, array $requiredKeys = null) + public static function parseFieldValue($fieldValue, ?array $requiredKeys = null) { if (!str_starts_with($fieldValue, 'Hawk')) { throw new NotHawkAuthorizationException; diff --git a/src/Dflydev/Hawk/Server/UnauthorizedException.php b/src/Dflydev/Hawk/Server/UnauthorizedException.php index 0324ff0..28db96d 100644 --- a/src/Dflydev/Hawk/Server/UnauthorizedException.php +++ b/src/Dflydev/Hawk/Server/UnauthorizedException.php @@ -9,7 +9,7 @@ class UnauthorizedException extends \Exception private $attributes; private $header; - public function __construct($message = null, array $attributes = null) + public function __construct($message = null, ?array $attributes = null) { parent::__construct($message); $this->attributes = $attributes ?: array();