Skip to content

Fix GH-9670: List -C and -q in the CLI help - #24790

Open
Truta446 wants to merge 1 commit into
php:PHP-8.4from
Truta446:gh9670-cli-help
Open

Truta446 wants to merge 1 commit into
php:PHP-8.4from
Truta446:gh9670-cli-help

Conversation

@Truta446

Copy link
Copy Markdown

Fixes GH-9670.

-C (--no-chdir) and -q (--no-header) are in the CLI option table and accepted, but are no-ops kept for CGI compatibility, and php -h did not list them. They are already documented in the manual's command line options page. This adds them to the help output, marked as no-ops so users are not misled, and keeps the help under 80 columns.

In the issue, @cmb69 suggested we could instead consider removing these options from the CLI. That would be a BC change for scripts that pass them (and is master/RFC territory), so this PR only makes the help match current behavior; happy to drop it if removal is preferred.

Tests: new sapi/cli/tests/gh9670.phpt (fails before, passes after). sapi/cli/tests on PHP-8.4 debug + ASan: 100 passed, 1 failed (upload_2G.phpt, which fails identically on an unpatched build in this environment).

Both options are accepted by the CLI (they are no-ops kept for CGI
compatibility) and are documented in the manual, but php -h did not list
them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant