Skip to content

[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

Merged
merged 3 commits into from
Sep 15, 2012
Merged

[Component][Dependency Injection][Parent Services] - Adding compile call #1681

merged 3 commits into from
Sep 15, 2012

Conversation

HelloGrayson
Copy link

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

@bamarni
Copy link
Contributor

bamarni commented Sep 4, 2012

There is still one left under the "Overriding Parent Dependencies" section ;)

@HelloGrayson
Copy link
Author

Good catch. Added. cc @bamarni

@richardmiller-zz
Copy link
Contributor

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

@HelloGrayson
Copy link
Author

I'd be open to that - the note could occur above the title "Overriding Parent Dependencies"

@HelloGrayson
Copy link
Author

ping @weaverryan - what do you think?

@weaverryan
Copy link
Member

@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!

@HelloGrayson
Copy link
Author

Ok sounds good - I'll send an update soon.

@HelloGrayson
Copy link
Author

ping @weaverryan @richardmiller

@richardmiller-zz
Copy link
Contributor

Looks good to me

weaverryan added a commit that referenced this pull request Sep 15, 2012
[Component][Dependency Injection][Parent Services] - Adding compile call
@weaverryan weaverryan merged commit b62334e into symfony:2.0 Sep 15, 2012
@weaverryan
Copy link
Member

Great - merged! Thanks everyone!

@HelloGrayson
Copy link
Author

@weaverryan this is still applicable for master/2.1 - how should I go about getting this in there as well?

@stof
Copy link
Member

stof commented Sep 16, 2012

@breerly the 2.0 branch is merged into 2.1 on a regular basis (and then 2.1 into master)

@HelloGrayson
Copy link
Author

got it thanks stof :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants