From 2602ce1fede8ba8c0d7f2894d009a05ab52073e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Franco=20Aceituno?= Date: Wed, 11 Aug 2021 14:39:17 +0200 Subject: [PATCH] fix doctrine error in symfony 5 Doctrine en Symfony 5: Argument 1 passed to App\Repository\Repository::__construct() must be an instance of Doctrine\Common\Persistence\ManagerRegistry, instance of Doctrine\Bundle\DoctrineBundle\Registry given --- Provider/DoctrineOrmSequenceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Provider/DoctrineOrmSequenceProvider.php b/Provider/DoctrineOrmSequenceProvider.php index 0b2b51b..193332d 100644 --- a/Provider/DoctrineOrmSequenceProvider.php +++ b/Provider/DoctrineOrmSequenceProvider.php @@ -13,7 +13,7 @@ namespace Indragunawan\SequenceBundle\Provider; -use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Bundle\DoctrineBundle\Registry; use Doctrine\DBAL\LockMode; use Doctrine\ORM\EntityManager; use Indragunawan\SequenceBundle\Model\SequenceInterface; @@ -27,7 +27,7 @@ final class DoctrineOrmSequenceProvider implements SequenceProviderInterface private $entityClass; private $managerName; - public function __construct(ManagerRegistry $registry, string $entityClass, ?string $managerName = null) + public function __construct(Registry $registry, string $entityClass, ?string $managerName = null) { $this->registry = $registry; $this->entityClass = $entityClass;