File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
MakeAuthenticatorLoginFormUserEntityLogout/tests
MakeAuthenticatorLoginFormUserEntity/tests
MakeAuthenticatorSecurity52LoginForm/tests Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 6
6
use App \Security \AppCustomAuthenticator ;
7
7
use Doctrine \ORM \EntityManagerInterface ;
8
8
use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
9
- use Symfony \Component \HttpFoundation \ Exception \ SessionNotFoundException ;
9
+ use Symfony \Component \HttpKernel \ Kernel ;
10
10
11
11
class SecurityControllerTest extends WebTestCase
12
12
{
@@ -65,7 +65,7 @@ public function testCommand()
65
65
$ tokenStorage = static ::$ container ->get ('security.token_storage ' );
66
66
67
67
// Handle Session deprecations in Symfony 5.3+
68
- if (class_exists (SessionNotFoundException::class) ) {
68
+ if (Kernel:: VERSION_ID >= 50300 ) {
69
69
$ tokenStorage ->disableUsageTracking ();
70
70
}
71
71
Original file line number Diff line number Diff line change 6
6
use App \Security \AppCustomAuthenticator ;
7
7
use Doctrine \ORM \EntityManagerInterface ;
8
8
use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
9
- use Symfony \Component \HttpFoundation \ Exception \ SessionNotFoundException ;
9
+ use Symfony \Component \HttpKernel \ Kernel ;
10
10
use Symfony \Component \Security \Core \Authentication \Token \TokenInterface ;
11
11
12
12
class SecurityControllerTest extends WebTestCase
F134
@@ -75,7 +75,7 @@ private function getToken(): ?TokenInterface
75
75
{
76
76
$ tokenStorage = static ::$ container ->get ('security.token_storage ' );
77
77
78
- if (class_exists (SessionNotFoundException::class) ) {
78
+ if (Kernel:: VERSION_ID >= 50300 ) {
79
79
$ tokenStorage ->disableUsageTracking ();
80
80
}
81
81
Original file line number Diff line number Diff line change 6
6
use App \Security \AppTestSecurity52LoginFormAuthenticator ;
7
7
use Doctrine \ORM \EntityManagerInterface ;
8
8
use Symfony \Bundle \FrameworkBundle \Test \WebTestCase ;
9
- use Symfony \Component \HttpFoundation \ Exception \ SessionNotFoundException ;
9
+ use Symfony \Component \HttpKernel \ Kernel ;
10
10
use Symfony \Component \Routing \Generator \UrlGeneratorInterface ;
11
11
12
12
/**
@@ -73,7 +73,7 @@ public function testLoginFormAuthenticatorUsingSecurity51(): void
73
73
$ tokenStorage = static ::$ container ->get ('security.token_storage ' );
74
74
75
75
// Handle Session deprecations in Symfony 5.3+
76
- if (class_exists (SessionNotFoundException::class) ) {
76
+ if (Kernel:: VERSION_ID >= 50300 ) {
77
77
$ tokenStorage ->disableUsageTracking ();
78
78
}
79
79
You can’t perform that action at this time.
0 commit comments