Skip to content

Add explanation of ContainerAware #4520

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

Closed
weaverryan opened this issue Nov 25, 2014 · 5 comments
Closed

Add explanation of ContainerAware #4520

weaverryan opened this issue Nov 25, 2014 · 5 comments
Labels
actionable Clear and specific issues ready for anyone to take them. DependencyInjection

Comments

@weaverryan
Copy link
Member

Before a #4433, we had a misplaced (because this is a section for beginners) explanation of ContainerAware (and ContainerAwareInterface and the trait). I think this should still be mentioned somewhere, though I'm not sure where (it relates only to the Symfony Framework).

@wouterj
Copy link
Member

wouterj commented May 3, 2015

Actually, it relates to DependencyInjection. I believe it should be documented in the DI component docs and a small note to the controller book should be added, referencing this new article and stating that Symfony will automatically inject it for controllers. The same note can be added to the console command cookbook, stating that commands implementing this will have the same behaviour.

@wouterj wouterj added actionable Clear and specific issues ready for anyone to take them. and removed needs comments labels May 3, 2015
@weaverryan
Copy link
Member Author

Yea, I think this details is not too important - we basically just need a spot that mentions that it works for controllers (without "bogging down" the controller chapter) and console commands. I wouldn't want much more than this.

@wouterj does it related to DI in any way? I'm not aware of a spot in that component that does anything with this interface.

@wouterj
Copy link
Member

wouterj commented May 5, 2015

@weaverryan the ContainerAware family is included in the DependencyInjection component. While the component doesn't use it internally, people using the DependencyInjection in a custom framework could want to use it in the same way as Symfony does. So I consider it a feature of the component (just like the ContainerAwareEventDispatcher is also a feature of the EventDispatcher component).

@weaverryan
Copy link
Member Author

@wouterj Agreed - a note about it then too in the DI components sections, as you mentioned - thanks :)

@javiereguiluz
Copy link
Member

Closing it as "won't fix" because Symfony is rapidly moving away from ContainerAware.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actionable Clear and specific issues ready for anyone to take them. DependencyInjection
Projects
None yet
Development

No branches or pull requests

4 participants