Skip to content
Merged
Show file tree
Hide file tree
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 Dec 9, 2024
238f296
Install `swissspidy/phpstan-no-private`
swissspidy Dec 9, 2024
e798de9
Update PHPStan config
swissspidy Dec 10, 2024
95793ee
Move PL hooks to own file
swissspidy Dec 10, 2024
498e0fb
PHPStan 2
swissspidy Dec 10, 2024
b02e354
Merge trunk into update/phpstan and resolve conflicts
westonruter Jun 20, 2026
85d3719
PHPStan: adapt config and ignores for the v2 upgrade
westonruter Jun 20, 2026
1f5a439
Fix Generic.PHP.RequireStrictTypes.MissingDeclaration
westonruter Jun 20, 2026
079d9d1
Suppress get_sites() argument.type errors in uninstall routines
westonruter Jun 20, 2026
9cd3c8b
Fix sprintf() placeholder type mismatches
westonruter Jun 20, 2026
96fda7d
Fix return.type errors in schema/filter/site-health functions
westonruter Jun 20, 2026
32e211b
Fix return.type errors in speculation-rules and enqueued-assets audit
westonruter Jun 20, 2026
f7a3618
Fix return.type errors in OD JSON schema and embed-optimizer test
westonruter Jun 20, 2026
9af1f33
Fix webp_uploads_generate_additional_image_source type errors and a l…
westonruter Jun 20, 2026
dacae5c
Use unsealed array shapes for dominant-color filter return types
westonruter Jun 20, 2026
9544f84
Fix return.type errors in webp-uploads metadata functions
westonruter Jun 20, 2026
a9d621c
Fix argument.type errors in webp-uploads metadata flow
westonruter Jun 20, 2026
ed9897d
Fix argument.type errors in plugin-availability and enqueued-assets a…
westonruter Jun 20, 2026
f0d6b9a
Suppress argument.type errors for over-strict WP core stubs
westonruter Jun 20, 2026
92eeb0d
Fix remaining offsetAccess, by-ref foreach, and misc PHPStan errors
westonruter Jun 20, 2026
1e8d34a
Fix PHPCS errors: move unsealed array shapes to @phpstan-param tags
westonruter Jun 20, 2026
da23c77
Provide real values for constants used by PHPStan
westonruter Jun 20, 2026
bedefb2
Fix line indentation
westonruter Jun 20, 2026
da55825
Add missing code-coverage-ignore exit code
westonruter Jun 20, 2026
9f893fa
Scope require.fileNotFound ignores to the TESTS_PLUGIN_DIR sentinel
westonruter Jun 20, 2026
836b3d3
Guard against a non-string filter path before wp_filesize()
westonruter Jun 20, 2026
1178875
Replace parallel breadcrumb arrays in get_lcp_element() with a single…
westonruter Jun 21, 2026
2d81b71
Improve placement of mixed in filter docs and revert to string
westonruter Jun 21, 2026
495ce9c
Add test for filesize derived from filter path in webp_uploads_genera…
westonruter Jun 22, 2026
ced04d6
Add missing period to end of description
westonruter Jun 22, 2026
fdc9dce
Add test for output format normalization in webp_uploads_filter_image…
westonruter Jun 22, 2026
71897bd
Ignore coverage for adding hooks
westonruter Jun 22, 2026
1c6711c
Simplify breadcrumb accumulation and tighten the count type
westonruter Jun 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 6 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,15 @@
},
"require-dev": {
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.11",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"slevomat/coding-standard": "^8.0",
"squizlabs/php_codesniffer": "^3.9",
"szepeviktor/phpstan-wordpress": "^1.3",
"wp-coding-standards/wpcs": "^3.1",
"wp-phpunit/wp-phpunit": "^6.5",
"yoast/phpunit-polyfills": "^2.0",
"phpstan/php-8-stubs": "^0.4.0",
"phpstan/phpstan-strict-rules": "^1.6"
"yoast/phpunit-polyfills": "^2.0"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "7.2"
Expand Down Expand Up @@ -88,7 +80,10 @@
"lint:speculation-rules": "@lint -- ./plugins/speculation-rules --standard=./plugins/speculation-rules/phpcs.xml.dist",
"lint:web-worker-offloading": "@lint -- ./plugins/web-worker-offloading --standard=./plugins/web-worker-offloading/phpcs.xml.dist",
"lint:webp-uploads": "@lint -- ./plugins/webp-uploads --standard=./plugins/webp-uploads/phpcs.xml.dist",
"phpstan": "phpstan analyse --memory-limit=2048M",
"phpstan": [
"composer --working-dir=phpstan install --no-interaction",
"phpstan/vendor/bin/phpstan analyse --memory-limit=2048M"

Copy link
Copy Markdown
Member

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 phpstan root directory?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Member

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/phpstan directory that could be reused.

Copy link
Copy Markdown
Member Author

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

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we had build-cs before I could just rename it to that.

],
"test": "phpunit --strict-coverage",
"test-multisite": [
"WP_MULTISITE=1 phpunit --exclude-group=ms-excluded"
Expand Down
Loading