Dependency Injection Demystified
The DependencyInjection component is the glue that holds our application together. In a modern Symfony application, we rely on auto-wiring, auto-configuration, and auto-discovery to magically generate the correct dependency tree for our application. But how do those automatisms work under the hood? What if they weren’t there?
We'll talk about many topics: default configuration via Symfony Flex • patterns: dependency injection and service location • services provided by bundles • service factories • dependency graphs • compiled containers • compile time vs runtime performance • the Container and ContainerBuilder classes • definitions, references, and aliases • autowiring • public vs. private services • inlining and removal of services • PSR-4 discovery • service tags and tagged iterator • autoconfiguration • compiler passes.