[wp-trac] [WordPress Trac] #59486: Make test suite compatible with PHPUnit 10 / 11

WordPress Trac noreply at wordpress.org
Thu Feb 15 16:15:08 UTC 2024


#59486: Make test suite compatible with PHPUnit 10 / 11
------------------------------+-----------------------------
 Reporter:  dingo_d           |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Future Release
Component:  Build/Test Tools  |     Version:  6.4
 Severity:  normal            |  Resolution:
 Keywords:  needs-patch       |     Focuses:
------------------------------+-----------------------------

Comment (by jujuguru):

 Adding my experience here with a workaround.

 {{{WP_UnitTestCase_Base::expectDeprecated}}} makes a call to
 {{{\PHPUnit\Util\Test::parseTestMethodAnnotations}}} during test setup and
 renders testing useless.

 **My simple workaround**
 I've commented the call to {{{parseTestMethodAnnotations}}} out in the
 file {{{abstract-testcase.php}}} and it has allowed test to complete.

 I will caveat that I'm only early doors with testing so other issues may
 arise. If they do and I figure out workarounds I'll share.

 **Current set up:**
 PHP 8.2.15
 PHPUnit 11.0.3
 WordPress 6.4.3
 Yoast Polyfills {{{^2.0}}}

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


More information about the wp-trac mailing list