IOC container beyond constructor injection
summary
Explains concrete patterns and Laravel calls: the IOC container composes objects via app->bind / app->make / app->singleton, uses reflection for recursive constructor injection, and composes decorators (a caching and a logging wrapper around an FTP storage) so the final service is assembled and testable. Shows service providers, container resolving events for method injection and soft dependencies, and call/wrap for lazy handlers. Notes contextual binding works for constructors but contextual binding for controller methods was denied as a feature.
AI-written summary · about
chapters (11)
- 0:00Start
- 1:21International Olympic Committee
- 11:49Automatic constructor injection
- 16:35Register bindings In the register method
- 18:31Bind a concretion for every interface
- 24:47Method injection
- 27:59Using the container
- 28:09Event Dispatchers - Router
- 33:41Solving circular dependencies
- 35:31Contextual binding for methods (unsupported)
- 36:39recap: Reflection Binding Calling code Bonus
related talks
01h 00mDad, how are Service Containers born?
27mDemystifying Dependency Injection Containers
02h 23mMastering Symfony 4's Dependency Injection
57mDependency Injection for Mere Humans
49m"Deep Dive into Symfony's Dependency Injection Component"
21mSoftware Design Patterns in Laravel 4
43mPerf and dependency injection — are you lazy enough?
32mDesign Patterns and Packages for Excellent Laravel Backoffices
