Skip to content

Commit 2aed271

Browse files
authored
Merge pull request #1975 from greg0ire/remove-unused-method
Remove unused method
2 parents 6107050 + 0eec908 commit 2aed271

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/Command/DoctrineCommand.php

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33
namespace Doctrine\Bundle\DoctrineBundle\Command;
44

55
use Doctrine\DBAL\Connection;
6-
use Doctrine\ORM\EntityManagerInterface;
76
use Doctrine\Persistence\ManagerRegistry;
8-
use InvalidArgumentException;
97
use Symfony\Component\Console\Command\Command;
108

11-
use function assert;
12-
139
/**
1410
* Base class for Doctrine console commands to extend from.
1511
*
@@ -23,27 +19,6 @@ public function __construct(
2319
parent::__construct();
2420
}
2521

26-
/**
27-
* Get a doctrine entity manager by symfony name.
28-
*
29-
* @param string $name
30-
* @param int|null $shardId
31-
*
32-
* @return EntityManagerInterface
33-
*/
34-
protected function getEntityManager($name, $shardId = null)
35-
{
36-
$manager = $this->getDoctrine()->getManager($name);
37-
38-
if ($shardId !== null) {
39-
throw new InvalidArgumentException('Shards are not supported anymore using doctrine/dbal >= 3');
40-
}
41-
42-
assert($manager instanceof EntityManagerInterface);
43-
44-
return $manager;
45-
}
46-
4722
/**
4823
* Get a doctrine dbal connection by symfony name.
4924
*

0 commit comments

Comments
 (0)