Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Lazy services are not shared #27756

Closed
Closed
@yellow1912

Description

@yellow1912

Symfony version(s) affected: 3.4.12

Description

I'm not sure if this is intentional or a new issue that has just come up, but it seems like any service that is declared as lazy is not shared anymore.

How to reproduce
Declare any service as lazy and then call it more than once any where, you will see that it is initialized more than once (__construct is called many times)

This issue happens today after I updated my code.

Edit: I tested on a very class with nothing but the __construct and another simple method, I can confirm that this happens on my current installation. If further checking is needed I can try with a barebone installation of Symfony.

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