[wp-trac] [WordPress Trac] #59448: is_wp_version_compatible works unreliably
WordPress Trac
noreply at wordpress.org
Mon Jan 29 20:49:11 UTC 2024
#59448: is_wp_version_compatible works unreliably
-------------------------------------------------+-------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
| Release
Component: Upgrade/Install | Version: 5.2
Severity: minor | Resolution:
Keywords: good-first-bug 2nd-opinion has- | Focuses:
patch has-unit-tests |
-------------------------------------------------+-------------------------
Comment (by costdev):
@peterwilsoncc @jorbin I opened a PR against @afragen's which has now been
merged.
This:
- adds the notice back to `is_wp_version_compatible()`.
- separates the tests into `test_is_wp_version_compatible()` and
`test_is_wp_version_compatible_should_throw_notice()` so that we're
testing the function's behaviour, rather than testing a patch.
- handles the notice in the test by storing `E_USER_NOTICE`s for checking
in the test, or throwing an Exception for non-`E_USER_NOTICE`.
- This is abstracted to a `private` method to reduce noise in the test
method.
- adds some extra datasets for the test checking for notices.
See [https://github.com/WordPress/wordpress-develop/pull/5677 Andy's PR]
for the latest iteration.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59448#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list