diff --git a/src/Command/DoctrineCommand.php b/src/Command/DoctrineCommand.php index a04f88ad..056e4eda 100644 --- a/src/Command/DoctrineCommand.php +++ b/src/Command/DoctrineCommand.php @@ -3,7 +3,7 @@ namespace Doctrine\Bundle\DoctrineBundle\Command; 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 +51,7 @@ protected function getEntityGenerator() * @param string $name * @param int|null $shardId * - * @return EntityManager + * @return EntityManagerInterface */ protected function getEntityManager($name, $shardId = null) { @@ -61,7 +61,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; }