Automattic / Automattic/wp-codebox
Playground PHPUnit bootstrap fails when Composer platform check writes to undefined STDERR
- Lingua principale
- TypeScript
- Stelle
- 17
- Fork
- 4
- Merge medio
- 59m
- PR unite (30g)
- 131
Descrizione
## Problem
A Homeboy-scoped WordPress PHPUnit run using WP Codebox Playground fails before any tests execute when a staged plugin's Composer `platform_check.php` reports a platform mismatch. The generated check calls `fwrite(STDERR, ...)`, but `STDERR` is undefined in the Playground eval context.
## Reproduction
Run a WordPress PHPUnit recipe against a Composer-backed plugin whose staged dependency platform check fails. Current observed command:
```sh
homeboy review test extrachill-api --path /var/lib/datamachine/workspace/extrachill-api@feat-227-concert-privacy --placement local --skip-lint -- --filter 'Concert_Tracking_RoutesTest|User_Settings_Privacy_RoutesTest|UserLocalSceneAdaptersTest'
```
Bootstrap fails in `load_component`:
```text
Error: Undefined constant "STDERR" at /wordpress/wp-content/plugins/extrachill-api/vendor/composer/platform_check.php:17
```
The trace reaches the plugin Composer autoloader from the Playground internal evaluator, before PHPUnit can run.
## Expected
The test environment should expose CLI stream constants when executing CLI-style PHPUnit workloads, or capture/report the underlying Composer platform mismatch without replacing it with an undefined-constant fatal.
## Impact
No test assertions execute, and the actual dependency/platform diagnostic is obscured by the missing runtime constant.
Observed with WP Codebox 0.12.14, `@automattic/wp-codebox-core` 0.12.14, `@automattic/wp-codebox-playground` 0.12.14, WordPress Playground latest.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Riproduci il fallimento con il Homeboy review command e segui l'evaluator interno di Playground fino a load_component e al platform_check.php di Composer del plugin staged. Verifica come i workload PHPUnit in stile CLI espongono le costanti degli stream e come viene segnalata l'incompatibilità della piattaforma; il lavoro è completato quando la diagnostica Composer sottostante viene preservata senza un errore fatale dovuto a una costante non definita prima dell'esecuzione di PHPUnit.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- php, typescript, 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