[wp-trac] [WordPress Trac] #61939: Stop using 'yes' and 'no' for autoloading in favor of recommended boolean

WordPress Trac noreply at wordpress.org
Tue Aug 27 17:01:10 UTC 2024


#61939: Stop using 'yes' and 'no' for autoloading in favor of recommended boolean
--------------------------------------+--------------------------
 Reporter:  flixos90                  |       Owner:  flixos90
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  6.7
Component:  Options, Meta APIs        |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  performance
--------------------------------------+--------------------------

Comment (by joemcgill):

 Just noting that changing these values in the upgrade routine and the
 existing unit tests were an intentional omission when the values were
 updated in #61045.

 I believe that my thinking at the time was that upgrade routines should
 remain compatible with the version of Core being upgraded by that routine
 in case something fails during upgrades, and the previous unit tests
 should stay unchanged to ensure that the changes we made to those APIs
 were still backwards compatible for folks using the long-established
 "yes"/"no" values.

 In retrospect, I don't think the caution with upgrade routines is
 warranted since upgrades are being executed using the functions as defined
 in the version being upgraded to. For the PHPUnit tests, as long as we
 have other unit tests in place to ensure backwards compatibility for
 "yes"/"no" values, I see no reason not to update the rest of the unit
 tests here.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61939#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list