[wp-trac] [WordPress Trac] #50902: Build/CI: fix running of the unit tests on PHP 8/nightly

WordPress Trac noreply at wordpress.org
Wed Sep 23 13:52:18 UTC 2020


#50902: Build/CI: fix running of the unit tests on PHP 8/nightly
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:
                                                 |  SergeyBiryukov
     Type:  task (blessed)                       |      Status:  closed
 Priority:  normal                               |   Milestone:  5.6
Component:  Build/Test Tools                     |     Version:
 Severity:  major                                |  Resolution:  fixed
 Keywords:  has-patch php8 commit has-unit-      |     Focuses:  coding-
  tests                                          |  standards
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"49037" 49037]:
 {{{
 #!CommitTicketReference repository="" revision="49037"
 Tests: Backport two changes from PHPUnit 9.3:

 * Replace the `Match` interface with `ParametersMatch`, to avoid parse
 errors due to `match` being a reserved keyword in PHP 8.
 * Replace `ReflectionParameter::getClass()` usage, which is deprecated in
 PHP 8.

 This allows tests relying on the `getMockForAbstractClass()` and
 `getMockBuilder()` methods to run again on PHP 8.

 When the test suite is updated for compatibility with PHPUnit 9.x, these
 overrides can be removed.

 Follow-up to [48972].

 See #50913, #50902.
 }}}

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


More information about the wp-trac mailing list