-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Show available commands in namespace when running namespace as command #47750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
e3525c4
to
a8c7a24
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me.
It would be great improvement in my eyes, if the available commands can have a shortcut with a number. If you enter the number the command will be executed.
|
a8c7a24
to
912ecd8
Compare
Hi @Chris53897! It may be a cool idea to explore further, but it is a bit out of scope for the current implementation. Currently, this PR reuses the |
Thank you @wouterj. |
… message (Titouan Galopin) This PR was merged into the 6.2 branch. Discussion ---------- [Console] Fix missing command not matching namespace error message | Q | A | ------------- | --- | Branch? | 6.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix for #47750 | License | MIT | Doc PR | - Following #47750, running a command with an exception not related to the console (for instance fatal error) could end up in a situation where the error handling code doesn't stop the execution flow and result in: ``` In Application.php line 307: [ErrorException] Warning: Undefined variable $command ``` This fixes this behavior by throwing the original exception when no other error handling cases could handle the problem. Commits ------- 1e7202d Fix missing command not matching namespace error message
Another little UX improvement found in the Docker CLI: When running the namespace as a command (e.g.
bin/console make
), instead of showing an error "this command does not exist", show the list of sub-commands in that namespace.I've kept the exit code and dispatching of the error event in place, to avoid any BC breaks on this matter.
Before
After