[wp-trac] [WordPress Trac] #54183: Tests: decide on how to handle deprecations in PHPUnit

WordPress Trac noreply at wordpress.org
Sun Sep 26 01:35:22 UTC 2021


#54183: Tests: decide on how to handle deprecations in PHPUnit
-------------------------------------------------+-------------------------
 Reporter:  jrf                                  |       Owner:  (none)
     Type:  task (blessed)                       |      Status:  new
 Priority:  normal                               |   Milestone:  5.9
Component:  Build/Test Tools                     |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  2nd-opinion needs-dev-note php81     |     Focuses:
  has-patch has-unit-tests                       |
-------------------------------------------------+-------------------------

Comment (by jrf):

 Replying to [comment:12 netweb]:
 > I'm seeing an instance of this in the PR I created a few hours before
 this ticket was created:
 >
 > > https://github.com/WordPress/wordpress-develop/pull/1709
 >
 >
 > PHPUnit Tests currently fail on PHP 7.2, 7.3, 7.4, & 8.0 which are CI
 runs that use PHPUnit 9.5.10 and 8.5.21:

 Ouch.. yes, that's what I meant by this being a breaking change. Shouldn't
 really have been released in a patch version of PHPUnit IMO.

 Note: I would recommend against the config file update for the PHPUnit
 9.3+ schema for now (PR 1709).
 The old config will work fine for the time being and works cross-version,
 while the PHPUnit 9.3+ would only work for PHPUnit 9.3+.

 By the time PHPUnit 10 comes out, we can start to use the "on the fly"
 migrate option in CI if needs be `phpunit --migrate-configuration`.


 > I've created a PR with the option-2 patch https://github.com/WordPress
 /wordpress-develop/pull/1710
 >
 > Maybe go for option-2 now whilst further researching option-3?

 Yes, looking at the responses so far, I think that's the way to go: commit
 the option 2 patch ASAP and then look at option 3 potentially for the
 future.

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


More information about the wp-trac mailing list