Skip to content

Increase PHPStan level to 2 and fix all reported errors#1111

Open
dkotter wants to merge 3 commits into
developfrom
update/phpstan-level
Open

Increase PHPStan level to 2 and fix all reported errors#1111
dkotter wants to merge 3 commits into
developfrom
update/phpstan-level

Conversation

@dkotter

@dkotter dkotter commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Description of the Change

We currently have PHPStan set at level 1. This PR updates that to level 2 and fixes all newly flagged errors.

This PR is followed by:

I was going to continue to level 8 but increasing to level 6 brings in 1000+ errors (mostly related to param typing it seems) so decided to pause for now.

How to test the Change

Mainly just ensuring all tests pass on this PR. If desired, can do smoke testing across the entire plugin

Changelog Entry

Developer - Increase PHPStan from level 1 to level 2 and fix all new errors.

Credits

Props @dkotter

Checklist:

Open WordPress Playground Preview

@dkotter dkotter added this to the 3.9.0 milestone Jun 12, 2026
@dkotter dkotter self-assigned this Jun 12, 2026
@dkotter dkotter requested review from a team and jeffpaul as code owners June 12, 2026 16:06
@github-actions github-actions Bot added the needs:code-review This requires code review. label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:code-review This requires code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant