DatabaseStorage constructor requires ObjectManager instance, which for current Doctrine versions is:
Doctrine\Persistence\ObjectManager instead of use-d Doctrine\Common\Persistence\ObjectManager.
Due to EntityManagerInterface being extended from Doctrine\Persistence\ObjectManager argument types are different and any LoginGateBundle is throwing exceptions everytime orm driver is being used.
Quick and dirty patch that fixed issue for me:
Index: vendor/anyx/login-gate-bundle/Storage/DatabaseStorage.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- vendor/anyx/login-gate-bundle/Storage/DatabaseStorage.php (date 1602671224230)
+++ vendor/anyx/login-gate-bundle/Storage/DatabaseStorage.php (date 1602671224230)
@@ -4,7 +4,7 @@
use Anyx\LoginGateBundle\Exception\BruteForceAttemptException;
use Anyx\LoginGateBundle\Model\FailureLoginAttempt;
-use Doctrine\Common\Persistence\ObjectManager;
+use Doctrine\Persistence\ObjectManager;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Exception\AuthenticationException;
DatabaseStorage
constructor requiresObjectManager
instance, which for current Doctrine versions is:Doctrine\Persistence\ObjectManager
instead ofuse
-dDoctrine\Common\Persistence\ObjectManager
.Due to
EntityManagerInterface
being extended fromDoctrine\Persistence\ObjectManager
argument types are different and any LoginGateBundle is throwing exceptions everytimeorm
driver is being used.Quick and dirty patch that fixed issue for me: