Skip to content

[DependencyInjection] Add ability reference tagged services as service locator #25465

Closed
@Koc

Description

@Koc
Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? yes
Symfony version 4.1

It would be nice allow inject tagged services as ServiceLocator instead of iterable. For example we have set of report generators, all of them implements ReportGenerator interface. We have tagged them with tag app.report_generator using autoconfigure, but we require compiler pass for creating ServiceLocator with them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DependencyInjectionFeatureRFCRFC = Request For Comments (proposals about features that you want to be discussed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions