title: Symfony 2: Dependency injection (DI) of Controllers
body: <p>Is there any chance to make Controllers dependent on their services not via using of service container inside them but through pure constructor dependency injection?</p>
  
  <p>I would like to write controllers in this way:</p>
  
  <pre><code>&lt;?php
  
  class ArticleController extends \Symfony\Bundle\FrameworkBundle\Controller\Controller
  {
      private $articleFacade;
      private $articleRepository;
  
      public function __construct(ArticleFacade $articleFacade, ArticleRepository $articleRepository)
      {
          $this-&gt;articleFacade = $articleFacade;
          $this-&gt;articleRepository = $articleRepository;
      }
  
      public function indexAction()
      {
          ...
      }
  
  }
  </code></pre>
  
  <p>Unfortunatelly as I can see Symfony ControllerResolver does new instances of Controllers not via ServiceContainer but via simple <code>return new $controller</code> call.   </p>