File tree Expand file tree Collapse file tree 2 files changed +18
-9
lines changed
Expand file tree Collapse file tree 2 files changed +18
-9
lines changed Original file line number Diff line number Diff line change 1616use Doctrine \Common \DataFixtures \Loader ;
1717use Doctrine \Common \DataFixtures \ProxyReferenceRepository ;
1818use Doctrine \Common \DataFixtures \Purger \ORMPurger ;
19- use Doctrine \Common \Persistence \ManagerRegistry ;
20- use Doctrine \Common \Persistence \ObjectManager ;
19+ use Doctrine \Common \Persistence \ManagerRegistry as LegacyManagerRegistry ;
20+ use Doctrine \Common \Persistence \ObjectManager as LegacyObjectManager ;
21+ use Doctrine \Persistence \ManagerRegistry ;
22+ use Doctrine \Persistence \ObjectManager ;
2123use Symfony \Bridge \Doctrine \DataFixtures \ContainerAwareLoader ;
2224use Symfony \Component \DependencyInjection \ContainerInterface ;
2325
@@ -45,20 +47,23 @@ class ORM
4547 */
4648 protected $ om ;
4749
48- /**
49- * Constructor.
50- */
5150 public function __construct (ContainerInterface $ container )
5251 {
5352 $ this ->container = $ container ;
5453 }
5554
56- public function getRegistry (): ManagerRegistry
55+ /**
56+ * @return ManagerRegistry|LegacyManagerRegistry
57+ */
58+ public function getRegistry ()
5759 {
5860 return $ this ->container ->get ('doctrine ' );
5961 }
6062
61- public function getOm ($ managerName = null ): ObjectManager
63+ /**
64+ * @return ObjectManager|LegacyObjectManager
65+ */
66+ public function getOm ($ managerName = null )
6267 {
6368 if (!$ this ->om ) {
6469 $ this ->om = $ this ->getRegistry ()->getManager ($ managerName );
Original file line number Diff line number Diff line change 1616use Doctrine \Common \DataFixtures \Loader ;
1717use Doctrine \Common \DataFixtures \ProxyReferenceRepository ;
1818use Doctrine \Common \DataFixtures \Purger \PHPCRPurger ;
19- use Doctrine \Common \Persistence \ManagerRegistry ;
19+ use Doctrine \Common \Persistence \ManagerRegistry as LegacyManagerRegistry ;
2020use Doctrine \ODM \PHPCR \DocumentManager ;
21+ use Doctrine \Persistence \ManagerRegistry ;
2122use Symfony \Bridge \Doctrine \DataFixtures \ContainerAwareLoader ;
2223use Symfony \Component \DependencyInjection \ContainerInterface ;
2324
@@ -40,7 +41,10 @@ public function __construct(ContainerInterface $container)
4041 $ this ->container = $ container ;
4142 }
4243
43- public function getRegistry (): ManagerRegistry
44+ /**
45+ * @return ManagerRegistry|LegacyManagerRegistry
46+ */
47+ public function getRegistry ()
4448 {
4549 return $ this ->container ->get ('doctrine_phpcr ' );
4650 }
You can’t perform that action at this time.
0 commit comments