title: Symfony container traits
body: <p>Strange problem, 
  I have controller which uses <strong>\Symfony\Component\DependencyInjection\ContainerAwareTrait</strong></p>
  
  <pre><code>class MainController
  {
      use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
      /**
       * @Route("/", name="_index")
       * @Template()
       */
      public function indexAction()
      {
           var_dump($this-&gt;container);
  
           return array();
      }
  }
  </code></pre>
  
  <p>but result is NULL. </p>
  
  <p>Tried on:</p>
  
  <ul>
  <li>Symfony 2.5.*</li>
  <li>MAMP 3.0</li>
  <li>PHP 5.4 5.5 </li>
  </ul>
  
  <p>My searches have not helped me. I think the solution is easy. </p>
  
  <p>Any ideas how to trace this error? </p>
  
  <p><strong>UPD:</strong> When i extend from Controller, container is available and everything is working properly. But according to symfony Controller reference extending is optional, i can use traits instead.</p>