Skip to content

Display aliases in debug:container command #39381

@tomasfejfar

Description

@tomasfejfar

Description
When debugging the container and showing a service with it's arguments (debug:container SomeService --show-arguments), it shows resolved services in arguments. But usually what I need to debug is not what service it injects, but why. And the answer is usually "there is an alias" that autowiring used to resolve this.

The command could show the whole resolve chain. Instead of Service(core.ticketsEvents) it could show Alias(Service_Tickets, Service(core.ticketsEvents)) for following service definition:

 Service_Tickets:
  alias: core.ticketsEvents

And following service:

class SomeService {
   __construct(Service_Tickets $tickets) {
   }
}

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