Skip to content

PHPUnit workload fails when Composer platform_check references undefined STDERR #1903

Description

@chubes4

Problem

A wordpress.phpunit workload fails before test discovery when a plugin's Composer autoloader includes the generated vendor/composer/platform_check.php in WP Codebox Playground.

Reproduction

From an Extra Chill plugin worktree:

homeboy review test extrachill-api --path /var/lib/datamachine/workspace/extrachill-api@fix-121-route-affinity

WP Codebox 0.12.14 installs Composer autoloaders successfully, then the PHPUnit workload aborts:

Recipe phase run_workloads failed: Recipe workflow steps[0] failed: wordpress.phpunit could not run: Error: Undefined constant \"STDERR\" at /wordpress/wp-content/plugins/extrachill-api/vendor/composer/platform_check.php:17

Run metadata:

  • Homeboy run: 72c60725-ce63-4e50-9674-698de5c79457
  • WP Codebox runtime: runtime-mrtlw45h-5gfo5q
  • WP Codebox packages: 0.12.14
  • Failure phase: run_workloads

Expected

The PHPUnit workload should provide CLI standard-stream constants or load Composer autoloaders in a way that does not make a generated platform check crash before test discovery.

Impact

Valid WordPress plugin tests cannot run in the sandbox whenever Composer generates a platform check that writes to STDERR on a failed requirement. The underlying platform-requirement message is also hidden by this secondary fatal error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions