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

Global styles revisions: update private methods to protected #52748

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jul 19, 2023

This PR should only be merged if the corresponding Core patch makes it into 6.3.

Otherwise I'll have to prep the changes for 6.4 :)

What?

Updates the private vars and methods in the Global styles revisions rest API controller to be protected.

Core backport PR: WordPress/wordpress-develop#4867

Why?

So class entities that inherit from the base can use them, and we can iterate on 6.3 features without having to copy over private methods to new classes all the time.

Testing Instructions

All tests should pass.
There is no functional change, only changes 2 vars and 1 method to protected.

@ramonjd ramonjd requested a review from spacedmonkey as a code owner July 19, 2023 05:54
@ramonjd ramonjd self-assigned this Jul 19, 2023
@ramonjd ramonjd added [Type] Bug An existing feature does not function as intended REST API Interaction Related to REST API Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json labels Jul 19, 2023
@github-actions
Copy link

This pull request has changed or added PHP files. Please confirm whether these changes need to be synced to WordPress Core, and therefore featured in the next release of WordPress.

If so, it is recommended to create a new Trac ticket and submit a pull request to the WordPress Core Github repository soon after this pull request is merged.

If you're unsure, you can always ask for help in the #core-editor channel in WordPress Slack.

Thank you! ❤️

View changed files
❔ lib/compat/wordpress-6.3/class-gutenberg-rest-global-styles-revisions-controller-6-3.php

@github-actions
Copy link

github-actions bot commented Jul 19, 2023

Flaky tests detected in 4224ec9.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5595531852
📝 Reported issues:

@ramonjd ramonjd merged commit 7811801 into trunk Jul 20, 2023
@ramonjd ramonjd deleted the update/global-styles-revisions-change-private-methods-vars-protected branch July 20, 2023 23:10
@github-actions github-actions bot added this to the Gutenberg 16.4 milestone Jul 20, 2023
@ramonjd
Copy link
Member Author

ramonjd commented Jul 20, 2023

Signed off for 6.3 https://core.trac.wordpress.org/ticket/58846

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Global Styles Anything related to the broader Global Styles efforts, including Styles Engine and theme.json REST API Interaction Related to REST API [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants