Skip to content

Subscribed services does not work with inheritance #54452

@theofidry

Description

@theofidry

Symfony version(s) affected

v6.4.4

Description

I attempted to use an abstract service implementing ServiceSubscriberInterface with the trait ServiceSubscriberTrait. I am however running into the following error:

ServiceNotFoundException: Service "Acme\ConcreteService::subscribedServiceName" not found: the container inside "Acme\ConcreteService" is a smaller service locator that is empty...

Before going any deeper into this, is it a known/intended limitation? If not I'll work on getting a reproducer, provided I'm not the one doing anything weird.

How to reproduce

To be provided.

Possible Solution

To be discussed.

Additional Context

No response

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