-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[HttpKernel] Add entry point to more easily create/configure the DI extension #13616
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
Conversation
*/ | ||
protected function createContainerExtension() | ||
{ | ||
if (class_exists($class = $this->getContainerExtension())) { |
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.
Looks wrong to me, should be getContainerExtensionClass, no? Can you add some tests as well?
697ac87
to
b5bc26d
Compare
b5bc26d
to
f4493e6
Compare
@fabpot Indeed, fixed + tests added. |
So, I would deprecate |
@fabpot IMO, the two methods have different topics and so, the one which resolves the DI extension class name ( I can obviously bring the two lines of code which resolves the DI extension class but if I can avoid it, I would follow this method. My point is I build a generic bundle implementation on top of the Symfony one, so, the DI extension class resolution is a feature I need but having it decouplated from the DI extension instanciation would be even better for passing dependencies :) |
An other way to do it would be to move the DI extension class resolution in the |
👍 |
1 similar comment
👍 |
Thank you @egeloen. |
I'm now getting |
Indeed, merge issue. Fixed now. |
Hey!
I would like to pass some dependencies to the DI extension through the bundle. In the current implementation, I need to duplicate the whole
getContainerExtension
in order to keep the extension alias check. This PR proposes to introduce an entry point for more easily do it.What do you think?