From b21271097b9367d9751c1b74bbad3857ba479910 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 12 Feb 2026 22:30:40 +1300 Subject: [PATCH 1/5] Require & test on 8.2-8.5 --- .github/workflows/php.yml | 2 +- composer.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 220d048..7b537c0 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['8.1', '8.2', '8.3'] + php: ['8.2', '8.3', '8.4',8.5] steps: - uses: actions/checkout@v3 diff --git a/composer.json b/composer.json index a0f9823..5908c73 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "A structured document parser.", "type": "library", "require": { - "php": "8.1.* || 8.2.* || 8.3.*", + "php": "8.2.* || 8.3.* || 8.4.* || 8.5.*", "ext-libxml": "*" }, "require-dev": { From 09bf56eb25a5fb03e99fed71c9a1a148a35ca73c Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 12 Feb 2026 22:34:03 +1300 Subject: [PATCH 2/5] Require phpspec 8.2.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5908c73..934cdc8 100644 --- a/composer.json +++ b/composer.json @@ -8,7 +8,7 @@ }, "require-dev": { "ext-mbstring": "*", - "phpspec/phpspec": "7.5.*", + "phpspec/phpspec": "8.2.0", "phpunit/phpunit": "9.6.* || 10.5.*", "friends-of-phpspec/phpspec-code-coverage": "6.3.* || 6.4.*", "phpstan/phpstan": "1.10.* || 1.11.* || 1.12.*", From 125b05ec31cfdca548bafaaac48201f57aaf7d4a Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 12 Feb 2026 22:35:26 +1300 Subject: [PATCH 3/5] Require phpspec-code-coverage 7.0.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 934cdc8..f82e6bb 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "ext-mbstring": "*", "phpspec/phpspec": "8.2.0", "phpunit/phpunit": "9.6.* || 10.5.*", - "friends-of-phpspec/phpspec-code-coverage": "6.3.* || 6.4.*", + "friends-of-phpspec/phpspec-code-coverage": "7.0.0", "phpstan/phpstan": "1.10.* || 1.11.* || 1.12.*", "phpstan/extension-installer": "1.3.* || 1.4.*", "jangregor/phpstan-prophecy": "1.0.*" From ed3086c76e5f0a2061b499b999e4d3a16609c548 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 12 Feb 2026 22:37:41 +1300 Subject: [PATCH 4/5] Fix phpstan issues --- src/State/AbstractState.php | 2 +- src/State/AmbiguousTokenFoundException.php | 2 +- src/State/NoTokenFoundException.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/State/AbstractState.php b/src/State/AbstractState.php index 780895c..058be2d 100644 --- a/src/State/AbstractState.php +++ b/src/State/AbstractState.php @@ -19,7 +19,7 @@ abstract class AbstractState implements StateInterface **/ private $matchers = []; - public function registerMatcher(MatcherInterface $matcher, callable $callback = null): void + public function registerMatcher(MatcherInterface $matcher, ?callable $callback = null): void { $this->matchers[] = ['matcher' => $matcher, 'callback' => $callback]; } diff --git a/src/State/AmbiguousTokenFoundException.php b/src/State/AmbiguousTokenFoundException.php index 8cb3b43..065bed0 100644 --- a/src/State/AmbiguousTokenFoundException.php +++ b/src/State/AmbiguousTokenFoundException.php @@ -36,7 +36,7 @@ public function __construct( array $calledMatchers, array $matchedTokens, int $code = 0, - Throwable $previous = null + ?Throwable $previous = null ) { $this->stateName = $stateName; $this->text = $text; diff --git a/src/State/NoTokenFoundException.php b/src/State/NoTokenFoundException.php index d0cb302..153aab7 100644 --- a/src/State/NoTokenFoundException.php +++ b/src/State/NoTokenFoundException.php @@ -24,7 +24,7 @@ class NoTokenFoundException extends RuntimeException */ private $remainingText; - public function __construct(string $stateName, int $currentPosition, string $remainingText, int $code = 0, Throwable $previous = null) + public function __construct(string $stateName, int $currentPosition, string $remainingText, int $code = 0, ?Throwable $previous = null) { $this->stateName = $stateName; $this->currentPosition = $currentPosition; From ad44b7794c201b08eb33bef24e657235b0971440 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 12 Feb 2026 22:39:05 +1300 Subject: [PATCH 5/5] Format CI --- .github/workflows/php.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 7b537c0..5e4cc6a 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -11,7 +11,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['8.2', '8.3', '8.4',8.5] + php: + - 8.2 + - 8.3 + - 8.4 + - 8.5 steps: - uses: actions/checkout@v3