title: Circular reference detected for service
body: <p>I have a simple class which looks like this:</p>
  
  <pre><code>&lt;?php
  namespace App\Algorithm;
  
  use App\Dao\MatchDao;
  use App\Service\MatchService;
  
  class Calculator {
      private $users;
      private $matchDao;
  
      function __construct(MatchService $matchService, MatchDao $matchDao) {
          $this-&gt;users = $matchService-&gt;users;
          $this-&gt;matchDao = $matchDao;
      }
  
      public function hourlyRate() {
          $query = $this-&gt;matchDao-&gt;getSingleColumn('Payment', 'hourly_rate', 32);
          var_dump($query);
      }
  }
  </code></pre>
  
  <p>But I get the following error message:</p>
  
  <blockquote>
    <p>Circular reference detected for service "App\Algorithm\Calculator",
    path: "App\Algorithm\Calculator -> App\Service\MatchService ->
    App\Algorithm\Calculator".</p>
  </blockquote>
  
  <p><strong>MatchService.php</strong></p>
  
  <pre><code>&lt;?php
  namespace App\Service;
  
  use App\Algorithm\Calculator;
  use App\Algorithm\Collection;
  
  class MatchService {
      public $users;
      private $collection;
      private $calculator;
  
      function __construct(Collection $collection, Calculator $calculator) {
          $this-&gt;collection = $collection;
          $this-&gt;calculator = $calculator;
      }
  
      public function getMatch($data) {
          $this-&gt;users = $this-&gt;collection-&gt;getAllUsers($data);
          $this-&gt;calculator-&gt;hourlyRate();
          return 1;
      }
  
  }
  </code></pre>
  
  <p>The problem would be <code>MatchService</code> but what exactly am I doing wrong?</p>