Speaker Deck

Dependency Injection and the Symfony2 Service Container

by Richard Miller

Published October 22, 2011 in Programming

Dependency injection and the service container are core parts of Symfony2's philosophy. Whilst it is easy to start getting services from the container, a better grasp of dependency injection will allow developers to make the most of this powerful feature.This talk starts by covering the basics of dependency injection and the different types of injection. It then moves from low level dependency injection onto using the service container for full scale application configuration. It continues with how to configure services using Symfony2's service container and the advantages of doing this in allowing application level wiring together of classes. Finally it takes a look at the tools available in Symfony2 for getting an overview of service use and interaction within in an application.