Skip to content

Commit 60ce52f

Browse files
Merge branch '5.2' into 5.x
* 5.2: fix merge
2 parents cd59bfa + 5854d55 commit 60ce52f

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

src/Symfony/Component/HttpKernel/EventListener/SessionListener.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Psr\Container\ContainerInterface;
1515
use Symfony\Component\HttpFoundation\Session\SessionInterface;
1616
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
17-
use Symfony\Component\HttpKernel\Event\GetResponseEvent;
17+
use Symfony\Component\HttpKernel\Event\RequestEvent;
1818

1919
/**
2020
* Sets the session in the request.
@@ -34,7 +34,7 @@ public function __construct(ContainerInterface $container, bool $debug = false)
3434
parent::__construct($container, $debug);
3535
}
3636

37-
public function onKernelRequest(GetResponseEvent $event)
37+
public function onKernelRequest(RequestEvent $event)
3838
{
3939
parent::onKernelRequest($event);
4040

src/Symfony/Component/Security/Http/Tests/Firewall/LogoutListenerTest.php

+7-7
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testHandleUnmatchedPath()
3636
$dispatcher = $this->getEventDispatcher();
3737
[$listener, , $httpUtils, $options] = $this->getListener($dispatcher);
3838

39-
[$event, $request] = $this->getGetResponseEvent();
39+
[$event, $request] = $this->getRequestEvent();
4040

4141
$logoutEventDispatched = false;
4242
$dispatcher->addListener(LogoutEvent::class, function (LogoutEvent $event) use (&$logoutEventDispatched) {
@@ -60,7 +60,7 @@ public function testHandleMatchedPathWithCsrfValidation()
6060

6161
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($dispatcher, $tokenManager);
6262

63-
[$event, $request] = $this->getGetResponseEvent();
63+
[$event, $request] = $this->getRequestEvent();
6464

6565
$request->query->set('_csrf_token', 'token');
6666

@@ -98,7 +98,7 @@ public function testHandleMatchedPathWithoutCsrfValidation()
9898
$dispatcher = $this->getEventDispatcher();
9999
[$listener, $tokenStorage, $httpUtils, $options] = $this->getListener($dispatcher);
100100

101-
[$event, $request] = $this->getGetResponseEvent();
101+
[$event, $request] = $this->getRequestEvent();
102102

103103
$httpUtils->expects($this->once())
104104
->method('checkRequestPath')
@@ -131,7 +131,7 @@ public function testNoResponseSet()
131131

132132
[$listener, , $httpUtils, $options] = $this->getListener();
133133

134-
[$event, $request] = $this->getGetResponseEvent();
134+
[$event, $request] = $this->getRequestEvent();
135135

136136
$httpUtils->expects($this->once())
137137
->method('checkRequestPath')
@@ -148,7 +148,7 @@ public function testCsrfValidationFails()
148148

149149
[$listener, , $httpUtils, $options] = $this->getListener(null, $tokenManager);
150150

151-
[$event, $request] = $this->getGetResponseEvent();
151+
[$event, $request] = $this->getRequestEvent();
152152

153153
$request->query->set('_csrf_token', 'token');
154154

@@ -179,7 +179,7 @@ public function testLegacyLogoutHandlers()
179179
$token = $this->getToken();
180180
$tokenStorage->expects($this->any())->method('getToken')->willReturn($token);
181181

182-
[$event, $request] = $this->getGetResponseEvent();
182+
[$event, $request] = $this->getRequestEvent();
183183

184184
$httpUtils->expects($this->once())
185185
->method('checkRequestPath')
@@ -208,7 +208,7 @@ private function getTokenStorage()
208208
return $this->createMock(TokenStorageInterface::class);
209209
}
210210

211-
private function getGetResponseEvent()
211+
private function getRequestEvent()
212212
{
213213
$event = $this->createMock(RequestEvent::class);
214214

src/Symfony/Component/Security/Http/Tests/Firewall/RememberMeListenerTest.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testOnCoreSecurityDoesNotTryToPopulateNonEmptyTokenStorage()
4646
->method('setToken')
4747
;
4848

49-
$this->assertNull($listener($this->getGetResponseEvent()));
49+
$this->assertNull($listener($this->getRequestEvent()));
5050
}
5151

5252
public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet()
@@ -65,7 +65,7 @@ public function testOnCoreSecurityDoesNothingWhenNoCookieIsSet()
6565
->willReturn(null)
6666
;
6767

68-
$event = $this->getGetResponseEvent();
68+
$event = $this->getRequestEvent();
6969

7070
$this->assertNull($listener($event));
7171
}
@@ -100,7 +100,7 @@ public function testOnCoreSecurityIgnoresAuthenticationExceptionThrownByAuthenti
100100
->willThrowException($exception)
101101
;
102102

103-
$event = $this->getGetResponseEvent($request);
103+
$event = $this->getRequestEvent($request);
104104

105105
$listener($event);
106106
}
@@ -135,7 +135,7 @@ public function testOnCoreSecurityIgnoresAuthenticationOptionallyRethrowsExcepti
135135
->willThrowException($exception)
136136
;
137137

138-
$event = $this->getGetResponseEvent();
138+
$event = $this->getRequestEvent();
139139

140140
$listener($event);
141141
}
@@ -167,7 +167,7 @@ public function testOnCoreSecurityAuthenticationExceptionDuringAutoLoginTriggers
167167
->method('authenticate')
168168
;
169169

170-
$event = $this->getGetResponseEvent();
170+
$event = $this->getRequestEvent();
171171

172172
$listener($event);
173173
}
@@ -201,7 +201,7 @@ public function testOnCoreSecurity()
201201
->willReturn($token)
202202
;
203203

204-
$event = $this->getGetResponseEvent();
204+
$event = $this->getRequestEvent();
205205

206206
$listener($event);
207207
}
@@ -245,7 +245,7 @@ public function testSessionStrategy()
245245
$request = new Request();
246246
$request->setSession($session);
247247

248-
$event = $this->getGetResponseEvent($request);
248+
$event = $this->getRequestEvent($request);
249249

250250
$sessionStrategy
251251
->expects($this->once())
@@ -299,7 +299,7 @@ public function testSessionIsMigratedByDefault()
299299
$request = new Request();
300300
$request->setSession($session);
301301

302-
$event = $this->getGetResponseEvent($request);
302+
$event = $this->getRequestEvent($request);
303303

304304
$listener($event);
305305
}
@@ -333,7 +333,7 @@ public function testOnCoreSecurityInteractiveLoginEventIsDispatchedIfDispatcherI
333333
->willReturn($token)
334334
;
335335

336-
$event = $this->getGetResponseEvent();
336+
$event = $this->getRequestEvent();
337337

338338
$dispatcher
339339
->expects($this->once())
@@ -347,7 +347,7 @@ public function testOnCoreSecurityInteractiveLoginEventIsDispatchedIfDispatcherI
347347
$listener($event);
348348
}
349349

350-
protected function getGetResponseEvent(Request $request = null): RequestEvent
350+
protected function getRequestEvent(Request $request = null): RequestEvent
351351
{
352352
$request = $request ?? new Request();
353353

0 commit comments

Comments
 (0)