Skip to content

chore(phpstan): enforce level 4 and start the level 5 rollout - #1892

Merged
JohnVillalovos merged 1 commit into
developfrom
jlvillal/phpstan
Nov 10, 2026
Merged

JohnVillalovos merged 1 commit into
developfrom
jlvillal/phpstan

Conversation

@JohnVillalovos

Copy link
Copy Markdown
Collaborator

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

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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.neon to level 5 with staged exclusions.
  • Updates AGENTS.md to 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

@JohnVillalovos
JohnVillalovos merged commit 978fbf0 into develop Nov 10, 2026
19 checks passed
@JohnVillalovos
JohnVillalovos deleted the jlvillal/phpstan branch November 10, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enhancement] Reach PHPStan level 4 with no baseline

2 participants