title: Error: Argument 1 passed to App\Repository\FooRepository::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry
body: <p>After updating to <code>doctrine/doctrine-bundle 2.1.2</code> I'm getting this error:</p>
  <blockquote>
  <p>Argument 1 passed to App\Repository\FooRepository::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\DoctrineBundle\Registry given, called in ...</p>
  </blockquote>
  <p>My Repository looks like this:</p>
  <pre class="lang-php prettyprint-override"><code>namespace App\Repository;
  
  use App\Entity\Foo;
  use Doctrine\ORM\QueryBuilder;
  use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
  use Doctrine\Common\Persistence\ManagerRegistry;
  
  class FooRepository extends ServiceEntityRepository
  {
      public function __construct(ManagerRegistry $registry)
      {
          parent::__construct($registry, Foo::class);
      }
  }
  </code></pre>
  <p>=&gt; See my own answer below.</p>