[wp-trac] [WordPress Trac] #46149: PHPUnit 8.x support

WordPress Trac noreply at wordpress.org
Sat Aug 7 11:14:53 UTC 2021


#46149: PHPUnit 8.x support
-------------------------------------------------+-------------------------
 Reporter:  SergeyBiryukov                       |       Owner:  netweb
     Type:  task (blessed)                       |      Status:  assigned
 Priority:  high                                 |   Milestone:  5.9
Component:  Build/Test Tools                     |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests early php8  |     Focuses:
  needs-dev-note                                 |
-------------------------------------------------+-------------------------

Comment (by SergeyBiryukov):

 In [changeset:"51573" 51573]:
 {{{
 #!CommitTicketReference repository="" revision="51573"
 Build/Test Tools: Remove SpeedTrapListener.

 Now that the tests can run PHPUnit cross-version and Composer will be used
 to install the test suite in CI, we could switch out the local copies of
 the [https://github.com/johnkary/phpunit-speedtrap PHPUnit speedtrap]
 package in favor of using the Composer package, which would prevent us
 having to make the WP local copies of the class compatible with later
 PHPUnit versions.

 The SpeedTrap test listener was introduced to identify slow tests and take
 action on these to make them faster.

 In practice, however, no notable action was ever taken based on the output
 of the test listener in all the years it was in place.

 With that in mind, it was decided to remove the SpeedTrap test listeners
 without replacement.

 If – at a future date – contributors would want to take action to speed up
 slow tests anyway, they can:
 * Either add the package to their local install and use the output they
 receive locally to identify slow tests.
 * Or use the PHPUnit native `@small` annotations in combination with the
 PHPUnit `PHP_Invoker` package as described in the PHPUnit documentation to
 [https://phpunit.readthedocs.io/en/stable/risky-tests.html#test-execution-
 timeout run tests with time limits].

 Follow-up to [35214], [35226], [35767], [44701], [51559-51572].

 Props jrf.
 See #46149.
 }}}

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


More information about the wp-trac mailing list