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
Project bootstrap mode loads project-autoload-file after the project bootstrap; PHPUnit loads it before #2621
In bootstrap-mode=project, the wordpress.phpunit run code (packages/runtime-playground/src/phpunit-command-handlers.ts) runs pg_run_project_bootstrap_stage(...) and only then pg_run_project_autoload_stage($project_autoload_file). vendor/bin/phpunit loads the project's composer autoloader before the configured bootstrap, and real bootstraps depend on that order. Jetpack's wpcomsh tests/bootstrap.php never requires vendor/autoload.php and references PHPUnit classes directly:
BOOTSTRAP FAILURE: project_bootstrap:Error: Class "PHPUnit\Runner\Version" not found at /wordpress/wp-content/plugins/wpcomsh/tests/WP_UnitTestCase_Fix.php:18
(Homeboy Lab run lab-offload-65e4465f, Codebox v0.35.0, with autoload-file= and project-autoload-file=/wordpress/wp-content/plugins/wpcomsh/vendor/autoload.php.)
Desired
When project-autoload-file is set, it is required before the project bootstrap, matching PHPUnit's own order. A bootstrap that also requires the same autoloader keeps working (require_once). The legacy fallback and the project_autoload stage markers stay.
AI disclosure: Claude Opus (Pi, via Roadie) traced this from a Homeboy Lab run and wrote this issue.
Activity
chubes4 commentedon Dec 3, 2026
Fixed by #2622.