Repository navigation
refactor(types): raise PHPStan from level 5 to max - #19
Merged
Merged
Conversation
added 6 commits
November 26, 2026 09:39
ogorzalka
changed the base branch from
fix/delete-multiple-invalid-key
to
main
November 26, 2026 09:38
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.
Branch:
chore/phpstan-above-5. Stacked onfix/delete-multiple-invalid-key: merge that PR first.What changes
One commit per level, no baseline, no ignore, then one test commit.
$seenstorage ofIncompleteObjectsis documented with the value type it has.ValueCodecdocuments$allowedClassesasbool|list<string>(whatSettingsgives it).Settings,PhpRedisConnector::credentials(),Manager,Environment,WordPressObjectCache).Redis::OPT_THROW_ON_ERRORis read by name and checked;Environment::current()keeps only the string keys of$_SERVERand$_COOKIE.No signature, hook, command or configuration key changes (public surface gate: unchanged).
Behaviour differences, only for values of the wrong type
__toString()) now takes its default. Before, it was cast ("Array",1) or raised an error.falseno longer sends an emptyAUTH.Ratchet
Each level was recorded with
vendor/bin/pollora-qa ratchet --update --metric=type_coverage:94.4(phpstan_level5 -> "max"). The tool also re-encodes the file (msi96.0->96,servicesmoves afterratchet); no other value changes. The type coverage floor stays at 94.4 although the tool measures 100.What this proves
phpstan analyseat level max: 0 errors (run with PHP 8.4 and 8.3).roave-backward-compatibility-check --from=v0.3.1(QA-05, run locally): no backwards-incompatible change.composer qa:fastpasses. Incomposer qa: code style, static analysis, Rector, dependency policy and analysis, audit, public surface, archive and ratchet pass.What this does not prove
composer qais not green locally: the tests gate has one failure,ManagerTest > it is not healthy without the drop-in..., because the machine has no phpredis (not checkedinstead ofunreachable: ...). The same failure happens on an untouchedmain.credentials()lives inPhpRedisConnectorTest, which is skipped as a whole without Redis; its assertions were run separately and pass.ManagerTestset aside) gives 90.49 %. In that run no surviving mutant is on a line this branch changes, but the Redis-only lines (PhpRedisConnector) are not mutated at all.@v0.1.35.