-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
[Component][Dependency Injection][Parent Services] - Adding compile call #1681
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
[Component][Dependency Injection][Parent Services] - Adding compile call #1681
Conversation
There is still one left under the "Overriding Parent Dependencies" section ;) |
Good catch. Added. cc @bamarni |
This is still the case if you load XML or Yaml config files directly into the container builder. IMO it would be better to not have the compile call in the example at all in favour of a note that says that the containerbuilder needs to be compiled with a link back to the compilation section of the di documentation |
I'd be open to that - the note could occur above the title "Overriding Parent Dependencies" |
ping @weaverryan - what do you think? |
@breerly sorry for the late arrival, but I agree with you guys - a nice note in here I think is the perfect solution. Can you make that change and then ping back? Thanks! |
Ok sounds good - I'll send an update soon. |
Looks good to me |
[Component][Dependency Injection][Parent Services] - Adding compile call
Great - merged! Thanks everyone! |
@weaverryan this is still applicable for master/2.1 - how should I go about getting this in there as well? |
@breerly the 2.0 branch is merged into 2.1 on a regular basis (and then 2.1 into master) |
got it thanks stof :) |
When using the
ContainerBuilder
outside of Symfony2, it's not immediately obvious that$container->compile()
needs to be called in order for parent services to properly resolved.symfony/symfony#5419