Skip to content

[DI] Bug with sharing of non-public service #23979

Closed
@ghost

Description

Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 3.3.6
PHP version 7.1

If service declared as non-public it stops to be shared, means for every consumer of such a service a new one will be instantiated. Explicit shared: true makes no difference. With public: true works as expected (shared by default).

Behaviour has been noticed for compiled ContainerBuilder, but not dumped.

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