Skip to content

Commit 2363c43

Browse files
committed
Relax return type of DoctrineCommand::getEntityManager
This is in case project uses custom implementation of entity manager, see https://github.com/doctrine/DoctrineBundle/pull/1855/files/1025d8e36bdd8c92a40f90ae245886f11d3ebc0c#r1916365132
1 parent ab136b4 commit 2363c43

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Command/DoctrineCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Doctrine\Bundle\DoctrineBundle\Command;
44

55
use Doctrine\DBAL\Connection;
6-
use Doctrine\ORM\EntityManager;
6+
use Doctrine\ORM\EntityManagerInterface;
77
use Doctrine\ORM\Tools\EntityGenerator;
88
use Doctrine\Persistence\ManagerRegistry;
99
use InvalidArgumentException;
@@ -51,7 +51,7 @@ protected function getEntityGenerator()
5151
* @param string $name
5252
* @param int|null $shardId
5353
*
54-
* @return EntityManager
54+
* @return EntityManagerInterface
5555
*/
5656
protected function getEntityManager($name, $shardId = null)
5757
{
@@ -61,7 +61,7 @@ protected function getEntityManager($name, $shardId = null)
6161
throw new InvalidArgumentException('Shards are not supported anymore using doctrine/dbal >= 3');
6262
}
6363

64-
assert($manager instanceof EntityManager);
64+
assert($manager instanceof EntityManagerInterface);
6565

6666
return $manager;
6767
}

0 commit comments

Comments
 (0)