Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] added ContainerAwareInterface to services.xml#535
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
lsmith77 commentedApr 13, 2011
Sorry, I didnt realize this before. Now leads to I guess we should ensure that interface setters are either called first or better yet we need to remove redundant calls? |
lsmith77 commentedApr 13, 2011
The following patch fixes the issue, basically it will not add a method call via interface injection if the method has already been explicitly set: I am not sure if there is a sane use case where one would want to do multiple method calls via interface injection. |
fabpot commentedApr 13, 2011
Your patch looks good to me. Can you send a PR? |
vicb commentedApr 13, 2011
@lsmith77 could we imagine something like a |
lsmith77 commentedApr 13, 2011
done here#541 |
lsmith77 commentedApr 13, 2011
Well in this particular case the point is to "fix" the hardcoded dependency set by the interface injection. |
lsmith77 commentedApr 13, 2011
Dependency injection is all about being able to inject what you want. Implementing an interface is a way for the class to ask for some dependencies, but final control over this should always be with the end user using the class and not with the class itself. |
No description provided.