Skip to content

Commit 01a2a89

Browse files
authored
BUGFIX: Fix Doctrine 1.3.3 compatibility
Fixes: #3
1 parent 1285199 commit 01a2a89

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Classes/Service/TwoFactorAuthenticationService.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Doctrine\DBAL\Connection;
77
use Doctrine\DBAL\DBALException;
88
use Doctrine\DBAL\Exception\InvalidArgumentException;
9-
use Doctrine\ORM\EntityManager as DoctrineEntityManager;
9+
use Doctrine\ORM\EntityManagerInterface;
1010
use Neos\Flow\Annotations as Flow;
1111
use Neos\Flow\Security\Account;
1212
use PragmaRX\Google2FA\Exceptions\IncompatibleWithGoogleAuthenticatorException;
@@ -52,11 +52,8 @@ public function initializeObject(): void
5252
$this->google2FA = new Google2FA();
5353
}
5454

55-
public function injectEntityManager(DoctrineObjectManager $entityManager): void
55+
public function injectEntityManager(EntityManagerInterface $entityManager): void
5656
{
57-
if (!$entityManager instanceof DoctrineEntityManager) {
58-
throw new \RuntimeException('Invalid EntityManager configured', 1550662984);
59-
}
6057
$this->dbal = $entityManager->getConnection();
6158
}
6259

0 commit comments

Comments
 (0)