Problem
A managed wordpress.phpunit workload can mount PHPUnit's TextUI/TestRunner.php while its Composer autoloader cannot resolve PHPUnit\\Runner\\DefaultTestResultCache.
Observed with WP Codebox 0.12.14 through Homeboy's WordPress test extension:
wordpress.phpunit could not run: Error: Class \"PHPUnit\\Runner\\DefaultTestResultCache\" not found at /tmp/wp-codebox-inputs/.../phpunit/phpunit/src/TextUI/TestRunner.php:195
The plugin under test has a tracked Composer lockfile but does not itself require PHPUnit. WP Codebox supplies the PHPUnit/wp-phpunit input bundle. The runtime reaches run_workloads, installs WordPress, mounts the plugin, and then fails before discovering or executing any tests.
Reproduction
Run a managed WordPress PHPUnit recipe against a plugin that has phpunit.xml tests but does not declare phpunit/phpunit in its own Composer requirements. Pass any filter. The generated command uses the WP Codebox vendor input as autoload-file; TestRunner loads, but DefaultTestResultCache does not.
Expected
The PHPUnit distribution and autoloader supplied by WP Codebox are internally complete and version-aligned. A component should not need to add a redundant PHPUnit dependency merely to repair the runtime-owned test runner.
Evidence
- failure phase:
run_workloads
- WP Codebox package:
0.12.14
- runtime artifact command:
wordpress.phpunit
- no tests execute (
total: 0)
- the prior archive-cache lock was independently cleared; this failure occurs after successful runtime startup
Problem
A managed
wordpress.phpunitworkload can mount PHPUnit'sTextUI/TestRunner.phpwhile its Composer autoloader cannot resolvePHPUnit\\Runner\\DefaultTestResultCache.Observed with WP Codebox 0.12.14 through Homeboy's WordPress test extension:
The plugin under test has a tracked Composer lockfile but does not itself require PHPUnit. WP Codebox supplies the PHPUnit/wp-phpunit input bundle. The runtime reaches
run_workloads, installs WordPress, mounts the plugin, and then fails before discovering or executing any tests.Reproduction
Run a managed WordPress PHPUnit recipe against a plugin that has
phpunit.xmltests but does not declarephpunit/phpunitin its own Composer requirements. Pass any filter. The generated command uses the WP Codebox vendor input asautoload-file;TestRunnerloads, butDefaultTestResultCachedoes not.Expected
The PHPUnit distribution and autoloader supplied by WP Codebox are internally complete and version-aligned. A component should not need to add a redundant PHPUnit dependency merely to repair the runtime-owned test runner.
Evidence
run_workloads0.12.14wordpress.phpunittotal: 0)