diff --git a/src/Command/DoctrineCommand.php b/src/Command/DoctrineCommand.php index a04f88ad..0ab5efed 100644 --- a/src/Command/DoctrineCommand.php +++ b/src/Command/DoctrineCommand.php @@ -4,6 +4,7 @@ use Doctrine\DBAL\Connection; use Doctrine\ORM\EntityManager; +use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\Tools\EntityGenerator; use Doctrine\Persistence\ManagerRegistry; use InvalidArgumentException; @@ -51,7 +52,7 @@ protected function getEntityGenerator() * @param string $name * @param int|null $shardId * - * @return EntityManager + * @return EntityManagerInterface */ protected function getEntityManager($name, $shardId = null) { @@ -61,7 +62,7 @@ protected function getEntityManager($name, $shardId = null) throw new InvalidArgumentException('Shards are not supported anymore using doctrine/dbal >= 3'); } - assert($manager instanceof EntityManager); + assert($manager instanceof EntityManagerInterface); return $manager; }