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

Fix block registration from metadata #3501

Closed
wants to merge 45 commits into from

Conversation

aristath
Copy link
Member

Trac ticket: https://core.trac.wordpress.org/ticket/56865


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.

Copy link
Member Author

@aristath aristath left a comment

Choose a reason for hiding this comment

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

Adding some notes regarding the changes done in this PR

src/wp-includes/blocks.php Outdated Show resolved Hide resolved
src/wp-includes/blocks.php Outdated Show resolved Hide resolved
src/wp-includes/blocks.php Outdated Show resolved Hide resolved
src/wp-includes/blocks.php Show resolved Hide resolved
src/wp-includes/blocks.php Outdated Show resolved Hide resolved
src/wp-includes/blocks.php Show resolved Hide resolved
@aristath aristath marked this pull request as ready for review October 20, 2022 07:14
Copy link
Member

@mukeshpanchal27 mukeshpanchal27 left a comment

Choose a reason for hiding this comment

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

Left one minor feedback.

src/wp-includes/blocks.php Show resolved Hide resolved
aristath and others added 3 commits March 2, 2023 11:17
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
@aristath
Copy link
Member Author

aristath commented Mar 2, 2023

Added PHPUnit tests and fixed issues that surfaced from said tests.

Copy link
Contributor

@costdev costdev left a comment

Choose a reason for hiding this comment

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

Thanks for the tests @aristath! I've left a few thoughts in this review. 🙂

tests/phpunit/tests/blocks/register.php Outdated Show resolved Hide resolved
tests/phpunit/tests/blocks/register.php Show resolved Hide resolved
tests/phpunit/tests/blocks/register.php Outdated Show resolved Hide resolved
tests/phpunit/tests/blocks/register.php Outdated Show resolved Hide resolved
aristath and others added 5 commits March 2, 2023 12:11
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
aristath and others added 3 commits July 10, 2023 10:12
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Copy link
Member

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

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

Please consider 0bfc842. This change will revert this change.

@aristath
Copy link
Member Author

Please consider 0bfc842. This change will revert this change.

Can you please elaborate? How does it revert that change? I don't see it 🤔

@spacedmonkey
Copy link
Member

Can you please elaborate? How does it revert that change? I don't see it 🤔

In 0bfc842, I made it so the file_exists is not run on the core blocks. The file exists is pointless as it always exists and ends up I/O. In this PR, you move the file_exists out the if statement, make it run again always, reverting my change.

Copy link
Member

@spacedmonkey spacedmonkey left a comment

Choose a reason for hiding this comment

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

Looks good to me.

@spacedmonkey
Copy link
Member

@aristath Is this good to commit.

@aristath
Copy link
Member Author

Yes, it is. 👍

@SergeyBiryukov
Copy link
Member

Thanks for the PR! Merged in r57026.

@aristath aristath deleted the fix/block-registration branch October 30, 2023 12:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants