-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DX][Console] With many commands, registration warnings are not visible #26203
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
Comments
The idea is to not prevent running other commands when only some of them could not be registered, so throwing would be doing one step back. |
I'm not sure this would be better actually. The command being run is more important than the others at this time. |
I agree that when a specific command is ran, the warning does not matter that much, so it should not mess with the output of the command. What about this:
|
👍. |
@Simperfit I probably won't get around this until next week, so if you want to fix it, you are welcome 😃 |
Yeah, I'm going to do it ;) |
…g at the end of the list command (Simperfit) This PR was merged into the 4.1-dev branch. Discussion ---------- [FrameworkBundle] show the unregistered command warning at the end of the list command | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | no | New feature? | yes <!-- don't forget to update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- don't forget to update UPGRADE-*.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #26203 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | I don't think we need one. This PR modify the warning error when you have unregistered command on the list command, it shows it at the end. Commits ------- 99b104a [FrameworkBundle] show the unregistered command warning at the end of the list command
Steps to reproduce
system:clear-logs
parent::__construct();
bin/console
Output:

The warning is printed correctly, but is like two screens of scrolling above. And it looked more like a Command registration issue, so there was no reason to scroll up. I discovered it by accident, after checking the DI configuration, trying manually tagging the command etc.
Idea 1: Move the command registration warnings bellow the command output. (At least for the "default" command)
Idea 2: Change the warning to exception. I think it is kind of similar to missing scalar constructor parameter, which throws an exception.
What do you think?
The text was updated successfully, but these errors were encountered: