8000 [DependencyInjection] Support multiple tags for ServiceLocator · Issue #35326 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
[DependencyInjection] Support multiple tags for ServiceLocator #35326
Closed
@alex-dev

Description

@alex-dev

It would be interesting to have the option of tagging multiple time a service added to a locator indexed by some key.

my_service:
  tags:
    - { name: tag, alias: 'key-1' }
    - { name: tag, alias: 'key-2' }

my_consumer:
  arguments: [!tagged_locator { tag: 'tag', index_by: 'key' }]

And one could get both key-1 and key-2 referring to the same service.

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