-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
debug:autowiring doesn't show classes when run without --all #30493
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
I can't reproduce the issue. What does the content of the file look like?
edit: I just notice, you mean that
|
I confirm the bug the command must return exception or the no aliased service. I suggested to return the aliased and no aliased when adding the search argument and i have added the PR. |
nicolas-grekas
added a commit
that referenced
this issue
Apr 7, 2019
…open) This PR was merged into the 4.3-dev branch. Discussion ---------- [FrameworkBundle] fix search in debug autowiring | Q | A | ------------- | --- | Branch? | master | 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 and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #30493 <!-- #-prefixed issue number(s), if any --> | License | MIT | Doc PR | <!-- Write a short README entry for your feature/bugfix here (replace this comment block.) This will help people understand your PR and can be used as a start of the Doc PR. Additionally: - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. --> Taking #30522 and finishing it with @nicolas-grekas comments. Is the sentence ok ? Commits ------- fec4bea fix debug:autowiringcommand
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.2.4
Description
When there is an autowirable class, that could be shown via debug:autowiring, an exception should be expected if the '--all' flag is not set and the passed argument doesn't match the alias.
How to reproduce
Create a new project:
Create a simple class Test.php in src. This is autowired.
Executing
it doesn't show the class, nor it returns an exception. This is because, since the service has no alias, there is no text added to the output here: https://github.com/symfony/framework-bundle/blob/master/Command/DebugAutowiringCommand.php#L114
Possible Solutions
Throw an exception in the line above.
Print something that says "There are matching services but without that exact match".
Print the class anyway.
The text was updated successfully, but these errors were encountered: