Joomla! 3.x includes DI (Dependency Injection) container. https://api.joomla.org/cms-3/classes/Joomla.DI.Container.html. I'm curious about it's usage in my joomla component. Did anyone try to set it up?

Also that would be nice to see some examples.

1 Answer 1


I saw it in the code but not outside of framework (in any of the extensions). I believe it gonna be used on a bigger scale in Joomla! 4. The main benefit from that is testability but there are others too. If you are not familiar with the concept you can see the explanation and some examples here:

  1. https://github.com/joomla-framework/di
  2. https://github.com/joomla-framework/di/blob/master/docs/why-dependency-injection.md

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.