Skip to content

feat: allow hiding modern commands from list and suggestions - #10586

Merged
paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:hidden-commands
Sep 27, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:hidden-commands

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description

Adds hidden commands via #[Command(hidden: true)], modelled on Symfony's #[AsCommand(hidden: true)]. A hidden command and its aliases are left out of spark list and the "Did you mean" suggestions, but still run when named exactly, including through command(), call(), and --help.

There is no setter, since listings read the registry built from the attribute at discovery.

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
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added the 4.8 PRs that target the `4.8` branch. label Sep 25, 2026

@michalsn michalsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be handy.

@paulbalandan
paulbalandan merged commit dc9c9f0 into codeigniter4:4.8 Sep 27, 2026
60 checks passed
@paulbalandan
paulbalandan deleted the hidden-commands branch September 27, 2026 12:31
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants