Skip to content

Commit 4fa1d8b

Browse files
Fix: stan (#1051)
* Fix: stan * update stan * Fix JSON formatting in composer.json --------- Co-authored-by: Herbert Roth <[email protected]>
1 parent 162ad47 commit 4fa1d8b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"codeception/module-symfony": "^3.1.1",
2727
"codeception/phpunit-wrapper": "^9",
2828
"ergebnis/phpstan-rules": "^2.0",
29-
"phpstan/phpstan": "1.12.15",
29+
"phpstan/phpstan": "^1.12.15",
3030
"phpstan/phpstan-symfony": "^1.3.5",
3131
"phpunit/phpunit": "^9.3"
3232
},

src/Controller/Admin/LoginController.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
use Pimcore\Tool;
3535
use Pimcore\Tool\Authentication;
3636
use Scheb\TwoFactorBundle\Security\TwoFactor\Provider\Google\GoogleAuthenticatorInterface;
37-
use Symfony\Bundle\SecurityBundle\Security;
3837
use Symfony\Component\EventDispatcher\GenericEvent;
3938
use Symfony\Component\HttpFoundation\RedirectResponse;
4039
use Symfony\Component\HttpFoundation\Request;
@@ -48,6 +47,7 @@
4847
use Symfony\Component\Security\Core\Exception\AuthenticationException;
4948
use Symfony\Component\Security\Core\User\UserInterface;
5049
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
50+
use Symfony\Component\Security\Http\SecurityRequestAttributes;
5151
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
5252
use Symfony\Contracts\Translation\LocaleAwareInterface;
5353
use Symfony\Contracts\Translation\TranslatorInterface;
@@ -325,9 +325,9 @@ public function twoFactorAuthenticationAction(Request $request, Config $config):
325325

326326
if ($request->hasSession()) {
327327
$session = $request->getSession();
328-
$authException = $session->get(Security::AUTHENTICATION_ERROR);
328+
$authException = $session->get(SecurityRequestAttributes::AUTHENTICATION_ERROR);
329329
if ($authException instanceof AuthenticationException) {
330-
$session->remove(Security::AUTHENTICATION_ERROR);
330+
$session->remove(SecurityRequestAttributes::AUTHENTICATION_ERROR);
331331

332332
$params['error'] = $authException->getMessage();
333333
}

0 commit comments

Comments
 (0)