You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
PHPUnit runner only supports the PHPUnit 9 API; project bootstraps that load PHPUnit 10+ fail in run_tests #2619
The wordpress.phpunit run code in packages/runtime-playground/src/phpunit-command-handlers.ts builds a TestSuite and calls (new PHPUnit\\TextUI\\TestRunner())->run($suite, $phpunit_args). That is the PHPUnit 9 API. With bootstrap-mode=project, the project's bootstrap autoloads the project's own vendor/phpunit/phpunit, which takes precedence over the harness's 9.6, and on PHPUnit 10+ the call fails:
BOOTSTRAP FAILURE: run_tests:TypeError: PHPUnit\TextUI\TestRunner::run(): Argument #1 ($configuration) must be of type PHPUnit\TextUI\Configuration\Configuration, PHPUnit\Framework\TestSuite given
at /wordpress/wp-content/plugins/wpcomsh/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:30
PHPUNIT_ZERO_TESTS cause=bootstrap_failed
Observed with Jetpack's wpcomsh via Homeboy, which uses automattic/phpunit-select-config (PHPUnit 9.6 / 11 / 12 depending on PHP). Every stage before this one now passes (activation, load_deps, the project bootstrap, load_tests). Most actively maintained plugins are on PHPUnit 10+.
Desired
wordpress.phpunit executes tests with whichever PHPUnit major is actually loaded (9.6, 10, 11, 12). The structured result lines the host parses (TESTS: … FAILURES: … ERRORS: …, ALL TESTS PASSED / SOME TESTS FAILED, stage markers) and the existing filter, selected-file, changed-file and listTests behavior stay the same on every major. PHPUnit 9 behavior is unchanged.
AI disclosure: Claude Opus (Pi, via Roadie) traced this from a Homeboy Lab run and wrote this issue.
Activity
chubes4 commentedon Dec 2, 2026
Fixed by #2620.