[wp-trac] [WordPress Trac] #59193: Remove misleading comment in class-wp-rest-blocks-controller.php

WordPress Trac noreply at wordpress.org
Thu Aug 24 19:11:19 UTC 2023


#59193: Remove misleading comment in class-wp-rest-blocks-controller.php
--------------------------+--------------------
 Reporter:  kadamwhite    |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  low           |  Milestone:  6.3.2
Component:  REST API      |    Version:  6.3
 Severity:  normal        |   Keywords:
  Focuses:  rest-api      |
--------------------------+--------------------
 In https://core.trac.wordpress.org/ticket/58657#comment:6 @david.binda
 calls out [https://core.trac.wordpress.org/browser/trunk/src/wp-includes
 /rest-api/endpoints/class-wp-rest-blocks-controller.php?rev=56093#L74 the
 confusing comment],

     `// Do not cache this schema because all properties are derived from
 parent controller.`

 @johnjamesjacoby [https://core.trac.wordpress.org/ticket/47871#comment:10
 flagged this comment as potentially misleading] when we originally
 introduced schema caching in #47871. Upon reflection,
 [https://core.trac.wordpress.org/ticket/58657#comment:11 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
 [https://core.trac.wordpress.org/ticket/58657#comment:14 agreed].

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/59193>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list