-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Shared service instantiated multiple times #49861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey, thanks for your report! |
Hello? This issue is about to be closed if nobody replies. |
As far as I know, the problem still exists. |
Hey, thanks for your report! |
I cannot reproduce the issue with symfony/dependency-injection 7.0.4. |
Symfony versions affected
5.4.17 to 5.4.21
Description
With a specific dependency graph with circular references, some services will be instanciated twice, e.g.
A' → B → A
instead ofA → B → A
. This happens withsymfony/dependency-injection
since version 5.4.17 up to latest version to date (5.4.21). Downgrading to version 5.4.16 fixes the issue. This seems to be caused by #48791.How to reproduce
I'm able to reproduce the issue with this graph of objects:
Inject
ServiceA
in e.g. a controller and add a breakpoint or echo something in its constructor to see it's instantiated twice.The text was updated successfully, but these errors were encountered: