File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change 33namespace Doctrine \Bundle \DoctrineBundle \Command ;
44
55use Doctrine \DBAL \Connection ;
6- use Doctrine \ORM \EntityManagerInterface ;
76use Doctrine \Persistence \ManagerRegistry ;
8- use InvalidArgumentException ;
97use 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 *
You can’t perform that action at this time.
0 commit comments