A Healthy Dose of Dependency Injection
Class dependencies are things that your classes need. You may be used to fetching them yourself, but what if someone else could bring them to you? This is what the Symfony DependencyInjection Component can do for you. It converts service definitions to executable PHP code. The result is that all the dependencies of your classes will be injected as constructor arguments automatically.
Since Drupal 8 heavily uses dependency injection, you need to learn as much as you can about this interesting subject. In the workshop "A healthy dose of dependency injection" Matthias tells you all about the design principles behind dependency injection (like Inversion of control and Dependency inversion). And of course, you will learn all the little details of working with service definitions.
- 03/20/2015 DrupalDays, Milan code