Skip to content

chore(qa): raise PHPStan to level 7 - #42

Merged
ogorzalka merged 3 commits into
mainfrom
chore/phpstan-level-7
Nov 25, 2026
Merged

ogorzalka merged 3 commits into
mainfrom
chore/phpstan-level-7

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Branch: chore/phpstan-level-7, stacked on chore/phpstan-level-6.

What changed

3 new errors (argument.type):

  • resolvePermissionCallback() is documented class-string<Permission>|Permission but, by its own runtime guard, accepts any string and answers 403 for one that is not a permission class: the PHPDoc now says string|Permission (no code change).
  • register_rest_route() expects non-falsy strings for the namespace and the route; an empty one is the developer's mistake and core refuses it itself with its own _doing_it_wrong. Two @phpstan-ignore argument.type (reason), reasons on the same line. No baseline entry.

Checked / not verified

0 errors, pest unchanged, composer qa passes. Semgrep not run; mutation not measured.

@ogorzalka
ogorzalka changed the base branch from chore/phpstan-level-6 to main November 25, 2026 12:20
@ogorzalka
ogorzalka merged commit 1acf8b3 into main Nov 25, 2026
10 checks passed
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.

1 participant