[wp-trac] [WordPress Trac] #43218: PHPUnit 7.x support

WordPress Trac noreply at wordpress.org
Sat Mar 3 16:45:04 UTC 2018


#43218: PHPUnit 7.x support
------------------------------+------------------------------
 Reporter:  ayeshrajans       |       Owner:
     Type:  defect (bug)      |      Status:  new
 Priority:  normal            |   Milestone:  Awaiting Review
Component:  Build/Test Tools  |     Version:  trunk
 Severity:  normal            |  Resolution:
 Keywords:                    |     Focuses:
------------------------------+------------------------------

Comment (by soulseekah):

 `PHPUnit_Util_Test` has indeed always been used for the `getTickets`
 method, which in turn uses `parseTestMethodAnnotations` from
 `PHPUnit\Util\Test`. It is, thus, safe to remove the inheritance.

 However, PHPUnit 7 introduces return type hinting, which is only available
 in PHP 7.0+. One such method, for example is
 `WP_UnitTestCase::assertFalse` which now hints at returning a `void`. The
 only way I know of to handle this in both 7.0+ and older versions is to
 copy the class into a PHP7+ version and load it dynamically. This is not
 going to fly, especially seeing that PHPUnit6 is more than okay for the
 time being.

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


More information about the wp-trac mailing list