Skip to content

Issue: findTaggedServiceIds() searches only in $definitions #17256

@devrck

Description

@devrck

Hi,

I've coded 2 services:

  1. The concrete service
<service id="just.simple.service" parent="parent.abstract" public="false" class="%parameter.just.simple.service.class%">
    <argument type="service" id="blabla" />
</service>
  1. The exposed service
<service id="just.service" alias="just.simple.service">
    <tag name="find.by.this.tag" />
</service>

When I try to get the services with the tag "find.by.this.tag" in a CompilerPass it returns a empty array.

$services = $container->findTaggedServiceIds('find.by.this.tag');

And the reason is because it iterates over ContainerBuilder::getDefinitions() and it ignores the $aliasDefinitions.

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