From 3f6e3679f15a8df18d0198b68481664f64295fda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Sat, 29 Nov 2025 00:18:06 +0100 Subject: [PATCH 1/5] Remove config.platform.php --- composer.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/composer.json b/composer.json index 85b158c..1aa05d1 100644 --- a/composer.json +++ b/composer.json @@ -25,9 +25,6 @@ "phpunit/phpunit": "^9.5" }, "config": { - "platform": { - "php": "7.4.6" - }, "sort-packages": true }, "extra": { From f693052b8092e1bb434d288e99ecdb58d4a4cef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Sat, 29 Nov 2025 00:19:40 +0100 Subject: [PATCH 2/5] Test on all supported PHP versions --- .github/workflows/build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d7e4088..b5bf493 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,9 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" + - "8.4" + - "8.5" steps: - name: "Checkout" @@ -87,6 +90,9 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" + - "8.4" + - "8.5" dependencies: - "lowest" - "highest" @@ -124,6 +130,9 @@ jobs: - "8.0" - "8.1" - "8.2" + - "8.3" + - "8.4" + - "8.5" dependencies: - "lowest" - "highest" From b104cefd7291b4e8a0335ad6fc9656559c30dd96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Sat, 29 Nov 2025 00:29:05 +0100 Subject: [PATCH 3/5] Remove empty namespacesRequiredToUse phpcs config PHPCS throws "Cannot assign null to property SlevomatCodingStandard\Sniffs\Namespaces\ReferenceUsedNamesOnlySniff::$namespacesRequiredToUse of type array in [...]php_codesniffer/src/Ruleset.php:1669" Having it empty equals to not setting it at all, I think: https://github.com/slevomat/coding-standard/blob/master/doc/namespaces.md#slevomatcodingstandardnamespacesreferenceusednamesonly- --- phpcs.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/phpcs.xml b/phpcs.xml index 51e69cc..0aaab42 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -87,7 +87,6 @@ - From dc11d0509de3320b21d9d6ee7cc603a9c608093c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Sat, 29 Nov 2025 00:36:42 +0100 Subject: [PATCH 4/5] Consistence config was moved to a local file in phpstan/build-cs https://github.com/phpstan/build-cs/commit/d11083d267742d976c06ad631a268928843c673e --- phpcs.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/phpcs.xml b/phpcs.xml index 0aaab42..bb21de2 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -8,12 +8,11 @@ - + - @@ -108,7 +107,7 @@ - + tests/*/data tests/*/data-attributes From 33ced321c96de362e08d50cc77297159810e1fd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Sat, 29 Nov 2025 00:41:26 +0100 Subject: [PATCH 5/5] substr() returns an empty string on PHP 8.x where it previously returned false PHPStan says: > Strict comparison using === between non-empty-string and false will always evaluate to false. but not on PHP 7.4. Removing the `=== false` comparison then throws errors on PHP 7.4. Another option would be to drop 7.4 support :-) --- phpstan.neon | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpstan.neon b/phpstan.neon index 88cd496..7e299df 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -20,3 +20,9 @@ parameters: path: '*/Nette/LinkChecker.php' reportUnmatched: false count: 1 + - + message: '#Strict comparison using === between non-empty-string and false will always evaluate to false\.#' + identifier: identical.alwaysFalse + path: '*/Nette/LinkChecker.php' + reportUnmatched: false + count: 1