title: How to setup class hierarchy with constructor injected services
body: <p>I have a few logic classes implemented as services. They do some similar stuff, so I wanted to setup a hierarchy:</p>
  
  <pre><code>namespace \Company\Bundle\Service;
  
  abstract class ParentLogic {
      protected $user;
      public function __construct($security_token_storage) {
          $this-&gt;user = $security_token_storage-&gt;getToken()-&gt;getUser();
      }
  }
  
  class ChildLogic extends ParentLogic {
  }
  </code></pre>
  
  <p>Here is how I have the services setup</p>
  
  <pre><code>services:
      parentlogic:
          abstract: true
          class: Company\Bundle\Service\ParentLogic
          arguments: [@security.token_storage]
      childlogic:
          class: Company\Bundle\Service\ChildLogic
          parent: parentlogic
  </code></pre>
  
  <p>however when I try to use the childlogic service in a controller</p>
  
  <pre><code>namespace Company\Bundle\Controller;
  
  class TestController {
      static public function getLogicService() {
          return $this-&gt;get('childlogic');
      }
  }
  </code></pre>
  
  <p>I get an error saying the argument to the constructor is missing:</p>
  
  <blockquote>
    <p>Warning: Missing argument 1 for Company\Bundle\Service\parentlogic::__construct(), called in /file/path/to/company/app/cache/dev/classes.php on line 2220 and defined</p>
  </blockquote>
  
  <p>Is this possible? If so what am I doing wrong, or better how is it done correctly?</p>