Opened 17 months ago
Closed 16 months ago
#59193 closed defect (bug) (fixed)
Remove misleading comment in class-wp-rest-blocks-controller.php
Reported by: | kadamwhite | Owned by: | kadamwhite |
---|---|---|---|
Milestone: | 6.3.2 | Priority: | low |
Severity: | normal | Version: | 6.3 |
Component: | REST API | Keywords: | has-patch commit fixed-major |
Focuses: | rest-api | Cc: |
Description
In https://core.trac.wordpress.org/ticket/58657#comment:6 @david.binda calls out the confusing comment,
// Do not cache this schema because all properties are derived from parent controller.
@johnjamesjacoby flagged this comment as potentially misleading when we originally introduced schema caching in #47871. Upon reflection, in a comment I just left on #58657,
My [@kadamwhite's] memory is that we felt at the time like the caching was unnecessary because it would already be in place at a higher level, but I don't personally see any downside to having added it r56093 -- it feels like a micro-optimization with uncertain payoff, which is not worth having one or two controllers work different from all the others. @johnjamesjacoby called me out on the comment at the time and I now agree that the uncertainty it introduces is not good.
@audrasjb requested that we separate any comment changes out into a new ticket to allow #58657 to remain marked as fixed in 6.3.0, so I am creating this ticket to propose removing the comment as misleading. @TimothyBlynJacobs has agreed.
Change History (9)
This ticket was mentioned in PR #5074 on WordPress/wordpress-develop by addisonhardy.
17 months ago
#2
- Keywords has-patch added
Remove misleading comment in class-wp-rest-blocks-controller.php
Trac ticket: [](https://core.trac.wordpress.org/ticket/59193)
kadamwhite commented on PR #5074:
17 months ago
#4
The "welcome new contributors" action has failed to complete, so @addisonhardy please let me fill in in place of the bot!
Hi @addisonhardy! 👋
Thank you for your contribution to WordPress! 💖
It looks like this is your first pull request to
wordpress-develop
. Here are a few things to be aware of that may help you out!
No one monitors this repository for new pull requests. Pull requests must be attached to a Trac ticket to be considered for inclusion in WordPress Core. To attach a pull request to a Trac ticket, please include the ticket's full URL in your pull request description.
Pull requests are never merged on GitHub. The WordPress codebase continues to be managed through the SVN repository that this GitHub repository mirrors. Please feel free to open pull requests to work on any contribution you are making.
More information about how GitHub pull requests can be used to contribute to WordPress can be found in this blog post.
Please include automated tests. Including tests in your pull request is one way to help your patch be considered faster. To learn about WordPress' test suites, visit the Automated Testing page in the handbook.
If you have not had a chance, please review the Contribute with Code page in the WordPress Core Handbook.
The Developer Hub also documents the various coding standards that are followed:
- PHP Coding Standards
- CSS Coding Standards
- HTML Coding Standards
- JavaScript Coding Standards
- Accessibility Coding Standards
- Inline Documentation Standards
Thank you,
The WordPress Project
#5
@
17 months ago
- Owner set to kadamwhite
- Resolution set to fixed
- Status changed from new to closed
In 56459:
kadamwhite commented on PR #5074:
17 months ago
#6
Committed in https://core.trac.wordpress.org/changeset/56459
Objective: remove comment
// Do not cache this schema...
in https://core.trac.wordpress.org/browser/trunk/src/wp-includes/rest-api/endpoints/class-wp-rest-blocks-controller.php?rev=56093#L74