Skip to content

Playground PHPUnit runtime lacks STDOUT for WP-CLI formatter tests #1901

Description

@chubes4

Bug

The WP Codebox Playground wordpress.phpunit workload runs PHPUnit in an environment where PHP's STDOUT constant is undefined. Tests that exercise WP-CLI formatters discover and start normally, then fail in cli\\Shell before assertions can complete.

Reproduction

From the data-machine-events component:

homeboy review test data-machine-events --skip-lint -- --filter CheckMissingVenueAddressesCommandTest

Observed with WP Codebox 0.12.14 / PHP 8.3.31:

Error: Undefined constant \"cli\\STDOUT\"

.../wp-cli/php-cli-tools/lib/cli/Shell.php:93
.../wp-cli/php-cli-tools/lib/cli/Table.php:83
.../wp-cli/wp-cli/php/WP_CLI/Formatter.php:301

Homeboy run: 6b5b3e42-d9b6-4990-9e0e-ecc3b838da6f
WP Codebox run: run_b8e095528c4944909e27cda4dff78811

Expected

The PHPUnit workload should provide CLI stream constants or otherwise execute WP-CLI-dependent tests in a compatible runtime so test behavior matches CLI PHPUnit.

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