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

WordPress Trac noreply at wordpress.org
Fri Aug 6 21:52:21 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:"51565" 51565]:
 {{{
 #!CommitTicketReference repository="" revision="51565"
 Tests: Replace `assertRegExp()` with `assertMatchesRegularExpression()`.

 The `assertRegExp()` and `assertNotRegExp()` methods were hard deprecated
 in PHPUnit 9.1 and the functionality will be removed in PHPUnit 10.0.

 The `assertMatchesRegularExpression()` and
 `assertDoesNotMatchRegularExpression()` methods were introduced as a
 replacement in PHPUnit 9.1.

 These new PHPUnit methods are polyfilled by the PHPUnit Polyfills and
 switching to them will future-proof the tests some more.

 References:
 *
 https://github.com/sebastianbergmann/phpunit/blob/9.1.5/ChangeLog-9.1.md#910
 ---2020-04-03
 * https://github.com/sebastianbergmann/phpunit/issues/4085
 * https://github.com/sebastianbergmann/phpunit/issues/4088

 Follow-up to [51559-51564].

 Props jrf.
 See #46149.
 }}}

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


More information about the wp-trac mailing list