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

PHP load: move rest template controller 6.6 import to "REST" area :) #61564

Merged
merged 2 commits into from May 13, 2024

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented May 10, 2024

What?

WP_REST_Templates_Controller extends WP_REST_Controller so it's probably best if it's loaded with the rest of the REST controllers.

Testing Instructions

There are no functional changes here.

CI should pass and also templates should work/appear as you'd expected in the site editor.

Check PHP logs just in case.

@ramonjd ramonjd added the [Type] Code Quality Issues or PRs that relate to code quality label May 10, 2024
@ramonjd ramonjd requested a review from fabiankaegy May 10, 2024 07:24
@ramonjd ramonjd self-assigned this May 10, 2024
Copy link

github-actions bot commented May 10, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: andrewserong <andrewserong@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

lib/load.php Outdated Show resolved Hide resolved
Copy link
Contributor

@andrewserong andrewserong left a comment

Choose a reason for hiding this comment

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

From looking at the linked files added in #60317, it doesn't seem that the load order was a factor there, so this looks like a safe change to me! I see you've added @fabiankaegy as a reviewer, so and it'll be a very quick revert if there was a reason the original order was used.

Just left a tiny whitespace nit, but otherwise LGTM! 🚀

@ramonjd ramonjd enabled auto-merge (squash) May 13, 2024 02:00
@ramonjd
Copy link
Member Author

ramonjd commented May 13, 2024

From looking at the linked files added in #60317, it doesn't seem that the load order was a factor there, so this looks like a safe change to me! I

Thanks for checking @andrewserong

The endpoints are initialized in the rest_api_init hooks anyhow so it should be fine. Also this PR makes it all consistent with existing REST API extensions by moving it to the extra parent class check block.

ramonjd and others added 2 commits May 13, 2024 12:06
…bly best if it's loaded with the rest of the REST controllers.
Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com>
@ramonjd ramonjd force-pushed the update/templates-rest-controller-load branch from b5c18ff to d2a85f4 Compare May 13, 2024 02:06
@ramonjd ramonjd merged commit a244260 into trunk May 13, 2024
61 checks passed
@ramonjd ramonjd deleted the update/templates-rest-controller-load branch May 13, 2024 02:41
@github-actions github-actions bot added this to the Gutenberg 18.4 milestone May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants