[wp-trac] [WordPress Trac] #50639: [PHP 8] Add @requires annotations for PHPUnit tests that assert engine-enforced constraints
WordPress Trac
noreply at wordpress.org
Wed Sep 16 01:33:57 UTC 2020
#50639: [PHP 8] Add @requires annotations for PHPUnit tests that assert engine-
enforced constraints
------------------------------------------+-----------------------------
Reporter: ayeshrajans | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.6
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: php8 has-patch needs-refresh | Focuses:
------------------------------------------+-----------------------------
Comment (by SergeyBiryukov):
In [changeset:"48979" 48979]:
{{{
#!CommitTicketReference repository="" revision="48979"
Tests: Revert [48973].
These tests ensure that a `_doing_it_wrong()` notice is thrown when
`wpdb::prepare()` is called incorrectly, but also that the function will
still handle the provided input as correctly as possible.
Disabling these tests on PHP 8 hides a problem, i.e. the function will no
longer throw a notice and handle things correctly, it will now cause a
white screen of death due to a fatal error.
That is a backward compatibility break, and `wpdb::prepare()` should be
updated instead to maintain the original behaviour on PHP 8.
Props jrf, ayeshrajans.
See #50913, #50639.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50639#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list