Skip to content

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

Merged
paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:help-drop-extra-arguments
Nov 12, 2026
Merged

paulbalandan merged 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
@paulbalandan
paulbalandan merged commit 8336083 into codeigniter4:4.8 Nov 12, 2026
60 checks passed
@paulbalandan
paulbalandan deleted the help-drop-extra-arguments branch November 12, 2026 14:28
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.

2 participants