Replace Psalm with PHPStan, require PHP 8.1 and Symfony ^6.4 || ^7.4 || ^8.0 - #38
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #38 +/- ##
==============================================
- Coverage 100.00% 60.00% -40.00%
Complexity 13 13
==============================================
Files 4 5 +1
Lines 43 90 +47
==============================================
+ Hits 43 54 +11
- Misses 0 36 +36 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…|| ^8.0 - Replace Psalm with PHPStan (level max) and list the code quality tools directly instead of requiring setono/code-quality-pack, since 2.x pulls in Psalm and 3.x requires PHP 8.2 - Fix PHPStan errors: explicit nullable parameter types (implicitly nullable parameters are deprecated in PHP 8.4), no short ternary, and more precise docblock types - Require PHP >=8.1 and Symfony ^6.4 || ^7.4 || ^8.0 - Convert services.xml to services.php, since the XML configuration format is deprecated in Symfony 7.4 - Upgrade to PHPUnit 10.5 (needed by matthiasnoback/symfony-dependency-injection-test for Symfony 8) and allow infection 0.32 (needed for Symfony 8) - Migrate ecs.php to ECSConfig, which newer ECS versions require - Update the CI matrix to PHP 8.1-8.4 and Symfony 6.4, 7.4 and 8.0
The popular bots list is a fast path checked before the full bot regex. It is now the 20 highest-volume crawlers based on Cloudflare Radar data (search engines, AI crawlers, SEO crawlers and Meta's fetchers). Yahoo! Slurp, ia_archiver and facebookcatalog are dropped: Yahoo search is served by Bing, Alexa was retired in 2022 and facebookcatalog is low volume. The list is now matched case-insensitively. Previously the "Bingbot" entry never matched Bing's real user agent, which uses "bingbot".
loevgaard
force-pushed
the
replace-psalm-with-phpstan
branch
from
September 21, 2026 08:39
f50d7d5 to
789a98a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Psalm → PHPStan at level
max, analysingbin,srcandtests. The tools are listed directly incomposer.jsoninstead of requiringsetono/code-quality-pack: 2.x pulls in Psalm and 3.x requires PHP 8.2.PHPStan fixes:
?Request $request = null,?array $popular = null), because implicitly nullable parameters are deprecated in PHP 8.4. Existing implementations ofBotDetectorInterfacestay compatible.BotDetector::isBot()is replaced with||, which behaves the same.Requirements: PHP
>=8.1and Symfony^6.4 || ^7.4 || ^8.0.Service config:
services.xmlis converted toservices.php, because Symfony 7.4 deprecates the XML configuration format.Test tooling:
^10.5, whichmatthiasnoback/symfony-dependency-injection-testneeds for Symfony 8.infection/infectionnow allows^0.32.0, the first versions that install with Symfony 8.phpunit.xml.distis migrated to the PHPUnit 10 format, and the data providers are static.ecs.php: migrated toECSConfig. The oldContainerConfiguratorformat fails with newer ECS versions.CI: the matrix covers PHP 8.1–8.4 and Symfony 6.4, 7.4 and 8.0. It excludes combinations that can't install: Symfony 7.4 needs PHP 8.2 and Symfony 8 needs PHP 8.4.
Popular bots list: updated to the 20 highest-volume crawlers, based on Cloudflare Radar data. It now covers search engines, AI crawlers, SEO crawlers and Meta's fetchers.
Yahoo! Slurp,ia_archiverandfacebookcatalogare dropped: Yahoo search is served by Bing, Alexa was retired in 2022 andfacebookcatalogis low volume.Case-insensitive matching: the list is now matched case-insensitively. Previously the
Bingbotentry never matched Bing's real user agent, which usesbingbot. Real user agents for the new entries are added to the test data.Test plan
Run locally:
In the two lowest runs, PHPUnit also shows 2 deprecations and 1 skipped test. Both come from Twig 3.27's own
IntegrationTestCaseand don't appear with newer Twig.Also checked:
composer validate --strict,composer normalize --dry-runandcomposer-dependency-analyserpass on PHP 8.4 with highest dependencies