-
Notifications
You must be signed in to change notification settings - Fork 158
Update PHPStan to v2, improve code quality #1729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
c8552c8
Don't redeclare constant
swissspidy 238f296
Install `swissspidy/phpstan-no-private`
swissspidy e798de9
Update PHPStan config
swissspidy 95793ee
Move PL hooks to own file
swissspidy 498e0fb
PHPStan 2
swissspidy b02e354
Merge trunk into update/phpstan and resolve conflicts
westonruter 85d3719
PHPStan: adapt config and ignores for the v2 upgrade
westonruter 1f5a439
Fix Generic.PHP.RequireStrictTypes.MissingDeclaration
westonruter 079d9d1
Suppress get_sites() argument.type errors in uninstall routines
westonruter 9cd3c8b
Fix sprintf() placeholder type mismatches
westonruter 96fda7d
Fix return.type errors in schema/filter/site-health functions
westonruter 32e211b
Fix return.type errors in speculation-rules and enqueued-assets audit
westonruter f7a3618
Fix return.type errors in OD JSON schema and embed-optimizer test
westonruter 9af1f33
Fix webp_uploads_generate_additional_image_source type errors and a l…
westonruter dacae5c
Use unsealed array shapes for dominant-color filter return types
westonruter 9544f84
Fix return.type errors in webp-uploads metadata functions
westonruter a9d621c
Fix argument.type errors in webp-uploads metadata flow
westonruter ed9897d
Fix argument.type errors in plugin-availability and enqueued-assets a…
westonruter f0d6b9a
Suppress argument.type errors for over-strict WP core stubs
westonruter 92eeb0d
Fix remaining offsetAccess, by-ref foreach, and misc PHPStan errors
westonruter 1e8d34a
Fix PHPCS errors: move unsealed array shapes to @phpstan-param tags
westonruter da23c77
Provide real values for constants used by PHPStan
westonruter bedefb2
Fix line indentation
westonruter da55825
Add missing code-coverage-ignore exit code
westonruter 9f893fa
Scope require.fileNotFound ignores to the TESTS_PLUGIN_DIR sentinel
westonruter 836b3d3
Guard against a non-string filter path before wp_filesize()
westonruter 1178875
Replace parallel breadcrumb arrays in get_lcp_element() with a single…
westonruter 2d81b71
Improve placement of mixed in filter docs and revert to string
westonruter 495ce9c
Add test for filesize derived from filter path in webp_uploads_genera…
westonruter ced04d6
Add missing period to end of description
westonruter fdc9dce
Add test for output format normalization in webp_uploads_filter_image…
westonruter 71897bd
Ignore coverage for adding hooks
westonruter 1c6711c
Simplify breadcrumb accumulation and tighten the count type
westonruter File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So there is a new
phpstanroot directory?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. Could also be renamed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have an existing
tools/phpstandirectory that could be reused.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm not sure I wanna mix the config directory with that one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we had
build-csbefore I could just rename it to that.