From 31b293c49be873fa871ba9eb256eab238699ac2a Mon Sep 17 00:00:00 2001 From: Patrick Date: Fri, 19 Sep 2014 15:50:19 +0200 Subject: [PATCH] changed di recommendation --- 8-dependency-injector.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/8-dependency-injector.md b/8-dependency-injector.md index 110332a..ef7e2d1 100644 --- a/8-dependency-injector.md +++ b/8-dependency-injector.md @@ -4,8 +4,7 @@ A dependency injector resolves the dependencies of your class and makes sure that the correct objects are injected when the class is instantiated. -My favorite injector is [Auryn](https://github.com/rdlowrey/Auryn), so install `rdlowrey/auryn` with composer or use one of these alternatives: -[Pimple](http://pimple.sensiolabs.org/), [Orno DI](https://github.com/orno/di), [PHP-DI](https://github.com/mnapoli/PHP-DI) +There is only one injector that I can recommend: [Auryn](https://github.com/rdlowrey/Auryn). Sadly all the alternatives that I am aware of are using the [service locator antipattern](http://blog.ploeh.dk/2010/02/03/ServiceLocatorisanAnti-Pattern/). Create a new file called `Dependencies.php` in your `src/` folder. In there add the following content: