Writing a Simple Dependency Injection Container in PHP: Lessons Learned

Photo by Ricky Kharawala on Unsplash

Why?

Implementation of the DI Container and PSR-11

composer require psr/container

The Container as an Array

Auto-wiring, Closures and Factory methods

The Container, Testing and Singletons

Conclusion

Solutions Architect and Coder

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store