Second round of WordPress npm package updates for 6.3 RC1#4861
Second round of WordPress npm package updates for 6.3 RC1#4861ramonjd wants to merge 3 commits intoWordPress:trunkfrom
Conversation
| * @param string $content The saved content. | ||
| * @param WP_Block $block The parsed block. |
There was a problem hiding this comment.
Missing @since for new parameters
@since 6.3.0 Added the `$content` and `$block` parameter.
There was a problem hiding this comment.
These files are auto-generated from the block-library npm package so any change to this has to be done in Gutenberg. Looking through the other block PHP files, we don't seem to be using @since notation in any of them though (or at least not consistently)
There was a problem hiding this comment.
Looks like an update is needed in all the block PHP files, as the PHP documentation standards state:
If significant changes have been made to a function, hook, class, or method, additional
@sincetags, versions, and descriptions should be added to provide a changelog for that function.
(details of what constitutes a significant change are mentioned on that page)
There was a problem hiding this comment.
Yeah I think we have to adopt core standards more consistently in the block-library PHP files given that they're not manually updated in core.
Is this something that should still be done for this release though? As it's essentially a code quality improvement.
There was a problem hiding this comment.
I'm not sure. It probably depends on when it's easier to do so, as historically adding @since could be a massive task 😅.
However, it's a docs-only change, so it can be committed at any time during the cycle, so there's several weeks where the @since for 6.3.0 could be added.
Is that doable @tellthemachines?
There was a problem hiding this comment.
I created an issue for it and added it to the 6.3 board. Let's see if we can get it done in time 😄
Trac ticket: https://core.trac.wordpress.org/ticket/58804
Update with latest bugfixes from WordPress/gutenberg#52677
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.