We could solve that by using a Dependency Injection Container, or DIC (worst acronym ever). The DIC knows about all services, and how to create them. Whenever you request a service, it will create it on the fly, including any service that it depends on.
Configuration of these services takes place in a static YAML file (could also be XML, TXT, INI or plain PHP).
The Symfony2 DependencyInjection component provides such a container that is pretty much standalone. By adding the YAML and Config components (optional dependencies of DependencyInjection) we can make it even easier to use.
Tying that into phpBB should be quite easy, and allow us to reduce boilerplate.
- http://symfony.com/doc/current/componen ... index.html
- http://symfony.com/doc/current/book/ser ... ainer.html