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

WordPress Trac noreply at wordpress.org
Mon Sep 7 19:21:41 UTC 2020


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

Comment (by SergeyBiryukov):

 In [changeset:"48957" 48957]:
 {{{
 #!CommitTicketReference repository="" revision="48957"
 Build/Test Tools: Allow unit tests to run on PHP 8 in full.

 PHP 8 introduces a new control structure called `match`, which makes
 `match` a reserved keyword in PHP 8.

 One of the PHPUnit dependencies declares a class named `Match`, which
 triggered a fatal error before PHPUnit could even start.

 To be able to use PHPUnit 7.x on PHP 8 and run the tests, core needs a new
 version of that dependency, which is now installed using Composer.

 This is the simplest way to get things working again and start addressing
 the individual test failures.

 Additionally, various test runs on PHP 8 on Travis are now performed
 individually instead of being chained, so that failures outside of WP
 scope don't block further execution.

 Props jrf, jorbin, pento.
 See #50902.
 }}}

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


More information about the wp-trac mailing list