Repository navigation
docs: fix missing filter @param names in WP_Theme_JSON_Resolver_Gutenberg` - #68386
Conversation
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
d04f51f to
4afce2f
Compare
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This matches the documentation of the same four filters in `WP_Theme_JSON_Resolver` in WordPress core, which named the parameter `$theme_json` in r56157. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The container property and `get_theme_json()` were documented with core's `WP_Theme_JSON`, but the constructor always assigns a `WP_Theme_JSON_Gutenberg`, which is not a subclass of it. The mistake was hidden while the theme.json data filter docblocks in `WP_Theme_JSON_Resolver_Gutenberg` failed to parse: with valid `@param` tags, PHPStan types the filtered value from them, and the wrong return type surfaced as seven errors where the resolver stores or returns the result. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the |
|
🤖 Comment by Claude Opus 5.5 Trunk was merged in, and two commits were added:
Together these resolve 10 errors reported at PHPStan level 5, with none introduced. Since the core counterparts are already correct, the |
What?
This PR fixes an issue with several
apply_filters()doc-blocks in WP_Theme_JSON_Resolver_Gutenberg where the@paramname was missing.Why?
While this issue was surfaced by PHPStan (via #66693) it can be remediated independently as part of #66598.
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast