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

Plugin: Fix REST API class redeclaration #40265

Merged
merged 1 commit into from
Apr 12, 2022

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Apr 12, 2022

What?

When testing the Gutenberg plugin with the most recent version of WordPres core it throws fatal error after: WordPress/wordpress-develop@a807e86.

Why?

2 new classes weren't correctly guarded against redeclaration.

How?

Correctly check whether classes just added to WordPress core are already declared.

Testing Instructions

All CI checks should pass again.

@gziolo gziolo self-assigned this Apr 12, 2022
@gziolo gziolo added Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Bug An existing feature does not function as intended labels Apr 12, 2022
Copy link
Contributor

@ntsekouras ntsekouras 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, thanks @gziolo ! Let's wait for the CI first before landing though 😄

@gziolo gziolo merged commit a1227f8 into trunk Apr 12, 2022
@gziolo gziolo deleted the fix/rest-api-class-redeclaration branch April 12, 2022 10:38
@github-actions github-actions bot added this to the Gutenberg 13.1 milestone Apr 12, 2022
@gziolo
Copy link
Member Author

gziolo commented Apr 12, 2022

The performance tests job failed, but I belive it's because we run it against trunk which is invalid at the moment.

@gziolo
Copy link
Member Author

gziolo commented Apr 12, 2022

Cherry-picked this PR to the Gutenberg 13.0 plugin release to ensure it can be tested with the latest version of WordPress core.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Plugin Issues or PRs related to Gutenberg Plugin management related efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants