Skip to content

Commit

Permalink
Add support for PHP 8.4 (#29)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Nathan Boiron <[email protected]>
  • Loading branch information
renovate[bot] and Mopolo authored Nov 26, 2024
1 parent 9f684cc commit 7abd56c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [ 8.2, 8.3 ]
php: [ 8.2, 8.3, 8.4 ]
dependency-version: [ prefer-lowest, prefer-stable ]

name: P${{ matrix.php }} - ${{ matrix.dependency-version }}
Expand All @@ -22,7 +22,6 @@ jobs:
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer:v2

- name: Cache dependencies
uses: actions/cache@v4
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,3 @@ coverage: ## to perform unit tests with code coverage.
.PHONY: phpstan
phpstan: ## to run PHPStan
php vendor/bin/phpstan analyse

.PHONY: infection
infection: ## to run Infection
php vendor/bin/infection --threads=max
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"require": {
"php": "8.2.* || 8.3.*"
"php": "8.2.* || 8.3.* || 8.4.*"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/MagicConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ final public function __construct(mixed $value)
$this->setValue($value);
}

public function getValue(string|int $format = null): mixed
public function getValue(string|int|null $format = null): mixed
{
if (empty($format)) {
return $this->value;
Expand Down Expand Up @@ -163,7 +163,7 @@ public static function keys(): array
/**
* @return static[]
*/
public static function values(string $pattern = null): array
public static function values(?string $pattern = null): array
{
$out = [];

Expand Down

0 comments on commit 7abd56c

Please sign in to comment.