Automattic / Automattic/studio

Keep PHP diagnostics out of WP-CLI stdout

Open
#4,686 0 comments 0 reactions 1 assignee Claimed by @chubes4 View on GitHub
[Status] Auto-allocated Bug YOLO
Dominant language
TypeScript
Stars
517
Forks
95
Avg merge
1d 22h
Merged PRs (30d)
162

Description

## Problem

`studio wp` can emit PHP 8.5 deprecations on stdout before command output. This corrupts machine-readable JSON and scalar results consumed by automation, even when the underlying WP-CLI command returns a valid contract.

The reprint runner already configures `error_reporting` and routes displayed errors to stderr, but `apps/cli/lib/run-wp-cli-command.ts` only configures SSL and `allow_url_fopen`.

## Reproduction

1. Run Studio with PHP 8.5.
2. Execute a WP-CLI command that loads the bundled React Promise code, such as `studio wp --help`.
3. Observe `Deprecated: Case statements followed by a semicolon...` on stdout before the command output.

## Expected

WP-CLI stdout contains only command output. PHP diagnostics are suppressed according to the CLI policy or routed to stderr. Add focused coverage for the configured PHP ini entries.

## AI assistance disclosure

GPT-5.6 Sol, via OpenCode, traced a downstream control-plane failure to Studio’s WP-CLI PHP configuration, compared it with the existing reprint configuration, and drafted this issue under human direction.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.