title: Silex - real DI vs injecting $app which looks like ServiceLocator?
body: <p>I read the article yesterday: <a href="https://igor.io/2012/11/09/scaling-silex.html" rel="noreferrer">https://igor.io/2012/11/09/scaling-silex.html</a></p>
  
  <p>And another one <a href="http://davedevelopment.co.uk/2012/10/03/Silex-Controllers-As-Services.html" rel="noreferrer">http://davedevelopment.co.uk/2012/10/03/Silex-Controllers-As-Services.html</a></p>
  
  <p>So a conceptual question rised in my head:</p>
  
  <p>Currently I do have a lot of controllers in separate classes. I overwrite <code>controller_resolver</code> to create a controller class instance and inject <code>$app</code> into contoller's constructor.</p>
  
  <p>I define routes like this <code>$app-&gt;get('/hello', 'HelloController::indexAction')</code> &lt;- my controller resolver will create <code>new HelloController($app);</code> - so far so good.
  But to be honest it became a ServiceLocator pattern, not a DependencyInjection, because I do inject whe whole <code>$app</code> which looks like ServiceLocator usage.</p>
  
  <p>Now I am in doubt: should I leave it as is (because it works well) or try "controllers as services" to inject only those sevices on which my controller really depends on? May be my SeviceLocator approach will hit me some day? (people say that DI is better for tests).</p>
  
  <p>I have also looked into Symfony Framework Bundle: class <code>Controller</code> extends abstract class <code>ContainerAware</code> which also have the whole <code>$container</code> injected! ServiceLocator approach in full stack framework?</p>
  
  <p>Any recomendation? Pros/cons?</p>