From 61f20a0d834ab13bfb801991ab3b6213d4d5cfc1 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sat, 25 Jul 2026 18:01:59 +0300 Subject: [PATCH 1/3] Add PHP 8.5 to psalm CI --- .github/workflows/static.yml | 2 +- composer.json | 1 + tools/psalm/composer.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index a7444a5..2967135 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -25,4 +25,4 @@ jobs: os: >- ['ubuntu-latest'] php: >- - ['8.1', '8.2', '8.3', '8.4'] + ['8.1', '8.2', '8.3', '8.4', '8.5'] diff --git a/composer.json b/composer.json index b5c9949..c35f4fb 100644 --- a/composer.json +++ b/composer.json @@ -68,6 +68,7 @@ "scripts": { "cs-fix": "php-cs-fixer fix", "rector": "rector", + "psalm": "psalm", "test": "phpunit --testdox --no-interaction", "test-watch": "phpunit-watcher watch" } diff --git a/tools/psalm/composer.json b/tools/psalm/composer.json index 9751a9f..9be3476 100644 --- a/tools/psalm/composer.json +++ b/tools/psalm/composer.json @@ -1,5 +1,5 @@ { "require-dev": { - "vimeo/psalm": "^5.26.1 || ^6.5" + "vimeo/psalm": "^5.26.1 || ^6.16.1" } } From acb0609f60c9f6795d82ec5b61817caa88a99c6d Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sat, 25 Jul 2026 18:17:06 +0300 Subject: [PATCH 2/3] fix test --- composer.json | 2 +- tests/NumericHelperTest.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c35f4fb..203cd46 100644 --- a/composer.json +++ b/composer.json @@ -69,7 +69,7 @@ "cs-fix": "php-cs-fixer fix", "rector": "rector", "psalm": "psalm", - "test": "phpunit --testdox --no-interaction", + "test": "phpunit", "test-watch": "phpunit-watcher watch" } } diff --git a/tests/NumericHelperTest.php b/tests/NumericHelperTest.php index c500c8a..a2de6af 100644 --- a/tests/NumericHelperTest.php +++ b/tests/NumericHelperTest.php @@ -198,9 +198,10 @@ public function testTrimDecimalZeros(?string $input, ?string $expected): void $this->assertSame($expected, NumericHelper::trimDecimalZeros($input)); } - public function trimDecimalZerosWithNonNumericString(): void + public function testTrimDecimalZerosWithNonNumericString(): void { $this->expectException(InvalidArgumentException::class); + $this->expectExceptionMessage('Value must be numeric string or null. "hello" given.'); NumericHelper::trimDecimalZeros('hello'); } } From e9836a9b23936103af3fcb187a9659a8344fad08 Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Sat, 25 Jul 2026 18:22:41 +0300 Subject: [PATCH 3/3] test --- tests/WildcardPatternTest.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/WildcardPatternTest.php b/tests/WildcardPatternTest.php index 9c8a9bf..afff187 100644 --- a/tests/WildcardPatternTest.php +++ b/tests/WildcardPatternTest.php @@ -109,6 +109,14 @@ public function testDisableOptions(): void $this->assertFalse($wildcardPattern->match('ABC42')); } + public function testPreparedPatternIsCachedBetweenMatchCalls(): void + { + $wildcardPattern = new WildcardPattern('begin*end'); + + $this->assertTrue($wildcardPattern->match('begin-middle-end')); + $this->assertFalse($wildcardPattern->match('begin-middle')); + } + public function testImmutability(): void { $original = new WildcardPattern('*');