8000 debug:autowiring doesn't show classes when run without --all · Issue #30493 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
debug:autowiring doesn't show classes when run without --all #30493
Closed
@disider

Description

@disider

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:

  symfony new test
  cd test

Create a simple class Test.php in src. This is autowired.

Executing

  bin/console debug:autowiring Test

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0