-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed
Description
Description
Setting a command to hidden
does not remove it from the list of suggested commands when the input is ambiguous. ("Did you mean one of these?"). That's of course a side effect of the command still being accessible and allowing commands to be shortened.
It feels a bit inconsistent but I'm actually not sure what to change about this. So maybe add a note to the docs?
Hidden commands behave the same as normal commands but they are no longer displayed in command listings, so end-users are not aware of their existence.
Note: In case a user enters an ambiguous command that matches the name of a hidden command it will still get shown in the list of suggestions.
How to reproduce
- create a command
some:visible-command
- create second command
some:hidden-command
but configure it with$this->setHidden(true)
- run
bin/console
→ only the first command is visible in the list of commands ✓ - run
bin/console some:
→
Did you mean one of these?
some:visible-command
some:hidden-command