Automattic / Automattic/wp-codebox

PHPUnit workload fails when Composer platform_check references undefined STDERR

Aperta
#1,903 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
17
Fork
4
Merge medio
59m
PR unite (30g)
131

Descrizione

## 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:

```sh
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:

```text
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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Iniziate dal punto di ingresso del workload `wordpress.phpunit` e riproducete il fallimento usando il comando fornito `homeboy review test`. Tracciate quando vengono caricati l’autoloader di Composer e il file generato `vendor/composer/platform_check.php` rispetto alla configurazione degli stream standard della CLI. Il lavoro è completato quando PHPUnit raggiunge la discovery dei test e il messaggio sottostante sui requisiti della piattaforma non viene nascosto da una costante `STDERR` non definita.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
php, wordpress
Ambito
backend, testing
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
55/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.