title: symfony2 service not registering dependencies
body: <p>I'm trying to create a service to persist/flush data  from a json feed to doctrine</p>
  
  <p>The services dependencies are: </p>
  
  <ul>
  <li>Doctrine EntityManager </li>
  <li>The Api that pulls the Data</li>
  </ul>
  
  <p>My Service Config:</p>
  
  <pre><code>services:
      fantasyapi:
          class:        FantasyDataAPI\Client
          arguments:    ["%fantasyapi.key%"]
      stadium_parser:
          class:        FantasyPro\DataBundle\DataManager\StadiumParser
          arguments:    ["@doctrine.orm.entity_manager", "@fantasyapi"]
  </code></pre>
  
  <p>My Service:</p>
  
  <pre><code>&lt;?php
  
  namespace FantasyPro\DataBundle\DataManager;
  
  use Doctrine\ORM\EntityManager;
  use FantasyDataAPI\Client;
  use FantasyPro\DataBundle\Entity\Stadium;
  
  class StadiumParser {
      /**
       * @var EntityManager $em
       */
      private  $em;
      /**
       * @var Client $client
       */
      private $client;
  
      public function __constuct( EntityManager $em, Client $client) {
          $this-&gt;em = $em;
          $this-&gt;client = $client;
      }
  
      /**
       * @return array
       */
      public Function parseData(){
          $stadiumData = $this-&gt;client-&gt;Stadiums();
          //var_dump($stadiumData);
          //get the Repo
          $repo = $this-&gt;em-&gt;getRepository('DataBundle:Stadium');
  
          $log = array();
  
          foreach ($stadiumData as $stadium) {
              // Get the current stadium in the list
              $criteria = array( 'stadiumID' =&gt; $stadium['StadiumID'] );
              $currentStadium = $repo-&gt;FindOneBy( $criteria );
  
              if ( ! $currentStadium) {
                  $currentStadium = new Stadium(); //no stadium with the StadiumID exists so create a new stadium
  
                  $logData = [
                      'action'   =&gt; 'Added Stadium',
                      'itemID'   =&gt; $stadium['StadiumID'],
                      'itemName' =&gt; $stadium['Name']
                  ];
                  $log[] = $logData;
              } else {
                  $logData = [
                      'action'   =&gt; 'Updated '.$logTitle,
                      'itemID'   =&gt; $stadium['PlayerID'],
                      'itemName' =&gt; $stadium['Name']
                  ];
                  $log[] = $logData;
              }
              $currentStadium-&gt;setStadiumID( $stadium['StadiumID'] );
              $currentStadium-&gt;setName( $stadium['Name'] );
              $currentStadium-&gt;setCity( $stadium['City'] );
              $currentStadium-&gt;setState( $stadium['State'] );
              $currentStadium-&gt;setCountry( $stadium['Country'] );
              $currentStadium-&gt;setCapacity( $stadium['Capacity'] );
              $currentStadium-&gt;setPlayingSurface( $stadium['PlayingSurface'] );
              $this-&gt;em-&gt;persist( $currentStadium );
          }
          $this-&gt;em-&gt;flush();
          return $log;
      }
  </code></pre>
  
  <p>I call this service from my controller:</p>
  
  <pre><code>public function StadiumServiceTestAction(){
          $parser = $this-&gt;container-&gt;get('stadium_parser');
          $log = $parser-&gt;parseData();
          return $this-&gt;render('DataBundle:Default:index.html.twig', array('log' =&gt; $log));
  
      }
  </code></pre>
  
  <p>When i call
  <code>$stadiumData = $this-&gt;client-&gt;Stadiums();</code></p>
  
  <p>i get the following error: <code>Call to a member function Stadiums() on a non-object</code> </p>
  
  <p>If i do a <code>var_dump($this);</code> right at the beginning of my method i get:</p>
  
  <pre><code>object(FantasyPro\DataBundle\DataManager\StadiumParser)[5133] 
  private 'em' =&gt; null 
  private 'client' =&gt; null 
  </code></pre>
  
  <p>Why aren't the dependencies getting injected?
  If I do php <code>app/console container:debug</code> my service is listed</p>
  
  <pre><code>[container] Information for service stadium_parser
  Service Id       stadium_parser
  Class            FantasyPro\DataBundle\DataManager\StadiumParser
  Tags             -
  Scope            container
  Public           yes
  Synthetic        no
  Required File    -
  </code></pre>
  
  <p>I've performed php <code>app/console cache:clear --env=dev</code> also but to no avail</p>