-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
The generated code for lazy non-shared services doesn't work #40642
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
@vkurdin-aw would you like to work on a fix? Or maybe just on a failing test case first? |
Hey, thanks for your report! |
Friendly ping? Should this still be open? I will close if I don't hear anything. |
@vkurdin-aw would you like to submit a PR with a failing test case? Alternatively, putting your reproducer in a small app that I could clone locally would really help. |
I just tried reproducing using the given instructions and I failed. I'm therefore closing. Please provide a git repo as a reproducer if you still experience this. |
@nicolas-grekas Yep, it is still reproduced in Run |
Given 4.4 is in security fixes only and this doesn't qualify, this is a won't fix. Thanks for the feedback! |
Symfony version(s) affected: 4.4.21
Description
When a service is declared as lazy and non-shared, generated code uses
$this->factories['service_name'](false);
inside proxy without initialization of$this->factories['service_name']
before. like #38327How to reproduce
Considering the following directory structure:
reproducer.php
src/MyClassParent.php
src/MyClass.php
generated
ContainerHNvJ5jM/getMyClassService.php
is:The key difference from #38327 example is to force compiler to insert
include_once ...
statements in the generated file, without inlined includes all works correctly.Possible Solution
The same trick from "Possible Solution" of #38327 is working for me.
The text was updated successfully, but these errors were encountered: