Skip to content

Commit d555c36

Browse files
authored
Merge pull request #4 from yeebase/bwaidelich-patch-1
BUGFIX: Fix Doctrine 1.3.3 compatibility
2 parents 1285199 + 18f528e commit d555c36

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

Classes/Service/TwoFactorAuthenticationService.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22
declare(strict_types=1);
33
namespace Yeebase\TwoFactorAuthentication\Service;
44

5-
use Doctrine\Common\Persistence\ObjectManager as DoctrineObjectManager;
65
use Doctrine\DBAL\Connection;
76
use Doctrine\DBAL\DBALException;
87
use Doctrine\DBAL\Exception\InvalidArgumentException;
9-
use Doctrine\ORM\EntityManager as DoctrineEntityManager;
8+
use Doctrine\ORM\EntityManagerInterface;
109
use Neos\Flow\Annotations as Flow;
1110
use Neos\Flow\Security\Account;
1211
use 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

0 commit comments

Comments
 (0)