wp-cli / wp-cli-tests

WP-CLI testing framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update PHPUnit to Version 4

jmichaelward opened this issue · comments

After installing the project requirements as part of WP-CLI Hack Day and running ./vendor/bin/phpunit, I was greeted by a PHP Fatal Error due to inconsistent function signature discrepancies in PHPUnit. The source of the problem appeared to be related to my relatively modern version of PHP (7.2.7), compared with the older version of PHPUnit that WP-CLI runs on (3.7.38).

As part of the v2 release of WP-CLI, we should consider updating PHPUnit to the latest 4.* release, which officially supports PHP 5.3, 5.4, and 5.5. I attempted to do this locally, and after running ./vendor/bin/phpunit again, I was greeted with but a few PHP deprecated function warnings, but all tests successfully ran.

Documentation for PHPUnit 4 can be found here.

This was done while moving package over to using wp-cli/wp-cli-tests.

Thanks for reporting, @jmichaelward !