Skip to content
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

Closed

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jul 18, 2023

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.

Comment on lines +12 to +13
* @param string $content The saved content.
* @param WP_Block $block The parsed block.
Copy link
Member

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.

Copy link
Contributor

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)

Copy link
Contributor

@costdev costdev Jul 18, 2023

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)

Copy link
Contributor

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.

Copy link
Contributor

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?

Copy link
Contributor

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 😄

@tellthemachines
Copy link
Contributor

Committed in r56255 / 9520d9e.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

4 participants