8000 back to the kernel check · symfony/maker-bundle@d39be33 · GitHub
[go: up one dir, main page]

Skip to content

Commit d39be33

Browse files
committed
back to the kernel check
1 parent 9861e7b commit d39be33

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/fixtures/MakeAuthenticatorLoginFormUserEntity/tests/SecurityControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use App\Security\AppCustomAuthenticator;
77
use Doctrine\ORM\EntityManagerInterface;
88
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
9-
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
9+
use Symfony\Component\HttpKernel\Kernel;
1010

1111
class SecurityControllerTest extends WebTestCase
1212
{
@@ -65,7 +65,7 @@ public function testCommand()
6565
$tokenStorage = static::$container->get('security.token_storage');
6666

6767
// Handle Session deprecations in Symfony 5.3+
68-
if (class_exists(SessionNotFoundException::class)) {
68+
if (Kernel::VERSION_ID >= 50300) {
6969
$tokenStorage->disableUsageTracking();
7070
}
7171

tests/fixtures/MakeAuthenticatorLoginFormUserEntityLogout/tests/SecurityControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use App\Security\AppCustomAuthenticator;
77
use Doctrine\ORM\EntityManagerInterface;
88
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
9-
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
9+
use Symfony\Component\HttpKernel\Kernel;
1010
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
1111

1212
class SecurityControllerTest extends WebTestCase
F134
@@ -75,7 +75,7 @@ private function getToken(): ?TokenInterface
7575
{
7676
$tokenStorage = static::$container->get('security.token_storage');
7777

78-
if (class_exists(SessionNotFoundException::class)) {
78+
if (Kernel::VERSION_ID >= 50300) {
7979
$tokenStorage->disableUsageTracking();
8080
}
8181

tests/fixtures/MakeAuthenticatorSecurity52LoginForm/tests/SecurityControllerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use App\Security\AppTestSecurity52LoginFormAuthenticator;
77
use Doctrine\ORM\EntityManagerInterface;
88
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
9-
use Symfony\Component\HttpFoundation\Exception\SessionNotFoundException;
9+
use Symfony\Component\HttpKernel\Kernel;
1010
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
1111

1212
/**
@@ -73,7 +73,7 @@ public function testLoginFormAuthenticatorUsingSecurity51(): void
7373
$tokenStorage = static::$container->get('security.token_storage');
7474

7575
// Handle Session deprecations in Symfony 5.3+
76-
if (class_exists(SessionNotFoundException::class)) {
76+
if (Kernel::VERSION_ID >= 50300) {
7777
$tokenStorage->disableUsageTracking();
7878
}
7979

0 commit comments

Comments
 (0)
0