Repository navigation
chore(phpstan): enforce level 4 and start the level 5 rollout - #1892
Merged
Merged
Conversation
The whole tree is clean at level 4, so raise phpstan.neon to level 4. There is no baseline and no ignored error. Move phpstan_next.neon to level 5 and exclude the areas that still report errors there (891 errors in 202 files), so each can be fixed and removed from the list in its own PR, as was done for levels 3 and 4. Update the documented level in AGENTS.md. Closes: #735 Assisted-by: Claude:claude-opus-5-5
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The PHPStan level changes and exclusions cannot be validated here because confirming the 891 diagnostics and level-4 clean result requires running the repository’s CI analysis with installed dependencies.
No open issues 🎉
What changed in this PR
Raises the repository’s enforced PHPStan level from 3 to 4 and begins a staged level 5 rollout with exclusions for areas that still report errors. Documentation is updated to reflect the new baseline.
Changes:
- Enforces PHPStan level 4 in
phpstan.neon. - Sets
phpstan_next.neonto level 5 with staged exclusions. - Updates
AGENTS.mdto document PHPStan level 4.
| File | Description |
|---|---|
phpstan.neon |
Raises the primary PHPStan analysis level to 4. |
phpstan_next.neon |
Raises progressive analysis to level 5 and excludes areas with outstanding diagnostics. |
AGENTS.md |
Updates static-analysis documentation to reflect PHPStan level 4. |
Review effort: Lite
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.
The whole tree is clean at level 4, so raise phpstan.neon to level 4. There is no baseline and no ignored error.
Move phpstan_next.neon to level 5 and exclude the areas that still report errors there (891 errors in 202 files), so each can be fixed and removed from the list in its own PR, as was done for levels 3 and 4.
Update the documented level in AGENTS.md.
Closes: #735
Assisted-by: Claude:claude-opus-5-5