File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22declare (strict_types=1 );
33namespace Yeebase \TwoFactorAuthentication \Service ;
44
5- use Doctrine \Common \Persistence \ObjectManager as DoctrineObjectManager ;
65use Doctrine \DBAL \Connection ;
76use Doctrine \DBAL \DBALException ;
87use Doctrine \DBAL \Exception \InvalidArgumentException ;
9- use Doctrine \ORM \EntityManager as DoctrineEntityManager ;
8+ use Doctrine \ORM \EntityManagerInterface ;
109use Neos \Flow \Annotations as Flow ;
1110use Neos \Flow \Security \Account ;
1211use PragmaRX \Google2FA \Exceptions \IncompatibleWithGoogleAuthenticatorException ;
@@ -52,11 +51,8 @@ public function initializeObject(): void
5251 $ this ->google2FA = new Google2FA ();
5352 }
5453
55- public function injectEntityManager (DoctrineObjectManager $ entityManager ): void
54+ public function injectEntityManager (EntityManagerInterface $ entityManager ): void
5655 {
57- if (!$ entityManager instanceof DoctrineEntityManager) {
58- throw new \RuntimeException ('Invalid EntityManager configured ' , 1550662984 );
59- }
6056 $ this ->dbal = $ entityManager ->getConnection ();
6157 }
6258
You can’t perform that action at this time.
0 commit comments