Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[DI] Fix anonymous factories/configurators support#22279
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| if ($function =$factory->getAttribute('function')) { | ||
| $definition->setFactory($function); | ||
| }else { | ||
| $factoryService =$this->getChildren($factory,'service'); |
nicolas-grekasApr 5, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
why keep this line? was is useless?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
That's a mistake :) Thanks !
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
👍
fabpot commentedApr 5, 2017
Thank you@GuilhemN. |
Uh oh!
There was an error while loading.Please reload this page.
Using prototypes / instanceof conditionals, anonymous factories are inlined using
Definition, so a new instance will be created for every service created from the prototype / conditional which is inconsistent with the way other anonymous services are managed.