contao/contao-bundle — pull request #6 by aschempp (2014-08-17 05:53:18+00:00)
Title: [WIP] Dependency injection for Contao classes

Services should not access the DI container to retrieve other services, the dependency should be injected by the DIC. I've added the most basic classes as services, now we need to find other candidates.

TODO:
- [ ] Should all singleton classes (e.g. `FrontendUser`) be services?
- [ ] Find and register other Contao classes as services in the DIC
- [ ] Rewrite current use of `Database` etc. to the DIC (e.g. in `SqlDumpCommand`
- [ ] Do we need to create interfaces for the old classes (so one does not need to rely on the actual implementation)?

Up for discussion @contao/developers