Repository navigation
chore: PHPStan level max, with no baseline - #24
Merged
Merged
Conversation
added 3 commits
November 27, 2026 16:55
Values from options, the database, filters and plugins are checked where they are read. The two inline @var casts are gone. Contact Form 7 gets a small PHPStan stub in place of an ignored pattern.
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.
PHPStan goes from level 5 to
max(about 190 errors at the start), with no baseline, no new ignore and no@varadded to quiet it. The two inline@varcasts of the configuration are removed, and the Contact Form 7 ignore pattern is replaced by a small stub (tests/Stubs/phpstan/). No setting, command, hook, route or payload of the HTTP contract changes.What changes on damaged or unexpected data
''or0(newDomain/Scalar), never asArrayor1.null;sizes.fullneeds both measures.get_post(), which would answer with the current post.title,contentorexcerptthat is not an object instead of failing on it.headless/search/argsfilter that returns neither an array nor a string is ignored (the endpoint's own arguments are used).wp headless token create|rotateandwp headless schema openapirefuse an option given as a list; a GraphQL schema that is not text is an error.pollora.headlessconfiguration that is not an array raisesInvalidSettingsException(booting with no settings would leave the front open); a hook service withoutadd()raisesHookServiceException.$wpdb: the redirect sources and the pending events answer with an empty list.To check
main, hidden by observe mode. The Rank Math sources are now read withunserialize(..., ['allowed_classes' => false])and thenosemgrepcomment with its reason that the sibling packages use. This is the only suppression added: please confirm you accept it.%i(needed for the literal-string check ofprepare()), so the package needs WordPress 6.2 or later. No minimum was declared until now.render_block()receives the same block as before, with its five known keys checked..harness.jsonstill recordsphpstan_level: 5: recordingmaxis left to a maintainer.