Skip to content

fix: drop extra arguments when --help is passed - #10728

Open
paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:help-drop-extra-arguments
Open

paulbalandan wants to merge 1 commit into
codeigniter4:4.8from
paulbalandan:help-drop-extra-arguments

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
When --help is passed, Console already drops the target command's options before running help, but it still put help in front of every argument. A command run with arguments and --help, such as spark env production --help, then failed with ArgumentCountMismatchException from help instead of printing the usage.

Only the first argument now reaches help, as the command name. An explicit spark help <command> <extra> still rejects the extra argument, since it was passed to help itself.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conform to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added 4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them labels Nov 5, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant