-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Second round of WordPress npm package updates for 6.3 RC1 #4861
Conversation
* @param string $content The saved content. | ||
* @param WP_Block $block The parsed block. |
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.
Missing @since
for new parameters
@since 6.3.0 Added the `$content` and `$block` parameter.
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.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
@since
tags, 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.