Skip to content

[RFC][DependencyInjection] Add separate section for named services generated through configuration #20454

Open
@codedmonkey

Description

@codedmonkey

For certain types of services in Symfony, it's possible to create named/scoped services, examples include:

Those named services can be referenced directly through dependency injection by naming and typing the dependency a certain way or by using the Target attribute. While this is amazing functionality that's already documented in the service container docs in the context of manually specifying service aliases, for the above use-cases it's explained differently for each one, and IMO it's difficult to understand unless you already know what's going on.

Should we make an additional part of the documentation specifically targeted at how to use aliased services that we can link from the above examples? I think this would improve DX

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