Skip to content

chore(qa): raise PHPStan to level 9 - #44

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

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

Conversation

@ogorzalka

Copy link
Copy Markdown
Member

Branch: chore/phpstan-level-9, stacked on chore/phpstan-level-8.

What changed

5 errors, all mixed in WpRestDiscovery::apply(): it destructured the items of the discovery pool (untyped) with ['class' => ..., 'attribute' => ..., 'structure' => ...]. attribute and structure were never used. It now skips an item that is not an array with a string class (it is not ours to register) and reads reflection_cache only if it is a ReflectionCacheInterface.
New test leaves alone what the pool holds that discover() did not collect (fails without the change: the old destructuring raised on an item without the keys).

Checked / not verified

0 errors; pest passes; composer qa passes. Semgrep not run; mutation not measured (a new branch is covered by the new test only).

@ogorzalka
ogorzalka changed the base branch from chore/phpstan-level-8 to main November 25, 2026 12:22
@ogorzalka
ogorzalka merged commit ab86abb 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