[wp-trac] [WordPress Trac] #61627: Introduce helper function get the unmodified value of `$wp_version`.

WordPress Trac noreply at wordpress.org
Sat Jul 27 00:45:15 UTC 2024


#61627: Introduce helper function get the unmodified value of `$wp_version`.
--------------------------------------+---------------------
 Reporter:  peterwilsoncc             |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  6.7
Component:  General                   |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+---------------------
Changes (by peterwilsoncc):

 * keywords:  has-patch has-unit-tests commit => has-patch has-unit-tests


Comment:

 Replying to [comment:9 afragen]:
 > @peterwilsoncc why would it break the tests for
 `is_wp_version_compatible()`?

 `is_wp_version_compatible()` uses the `$wp_version` global without making
 sure it's unmodified. A couple of the tests modify the `$wp_version`
 global to ensure the function works as expected. See
 [https://core.trac.wordpress.org/browser/trunk/tests/phpunit/tests/functions/isWpVersionCompatible.php?rev=58813
 tests/phpunit/tests/functions/isWpVersionCompatible.php].

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


More information about the wp-trac mailing list