Repository navigation
docs(types): array value types and missing PHPDoc tags for PHPStan level 6 (#44, lot A, 1/2) - #45
Merged
Merged
Conversation
…n level 6 asks for
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.
Part of #44, lot A (PHPStan level 6 in PHPDoc), first of two: array value types and missing
@return/@paramtags. No native signature changes. Apart from comments, the only line added tosrcis oneuseimport (added by Pint for a docblock).The analysed level stays at 5.
phpstan.neon,phpstan-baseline.neon,.harness.jsonandapi-surface.jsonare untouched.PHPStan error counts (measured on 1068350, PHPStan 2.3.4)
mainRemaining with the baseline: 77
missingType.generics, 10missingType.iterableValue, 1argument.templateType. The second PR handles the generics and lists what cannot move without regenerating the baseline.Choices
array<mixed>. It says nothing about the elements, on purpose: Colt's models are extension points, and a narrower type on a property that a subclass redeclares with@var arraywould be reported in that project's own analysis.PostBuilder::search()documents$termasstring|Arrayable|iterable|false|nullinstead ofmixed(needed to resolve thecollect()templates). A project passing something else, such as an integer, can now see a static analysis error.@return void.What this proves
main: same files, identifiers and messages. No baseline entry is retired, reworded or added.composer qa:fast: every gate passed.composer qa: exit 0, every gate that ran passed (280 tests passed, 1 incomplete). Ratchet: PHPStan level 5 and 48 baseline entries unchanged.vendor/bin/rector process --dry-run: nothing to change.pollora/framework(main, 64acf70), whose models extend Colt's: its PHPStan run gives the same output with Colt frommainand from this branch (a single unrelated deprecation notice on local PHP 8.5).What it does not prove