Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@devrck

Description

@devrck
Issue body actions

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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.