Skip to content

Commit 0f36bda

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Fix KernelBrowser::loginUser() causing deprecation use $sessionId instead of $sessionCookiePath on SessionUtils::popSessionCookie call [Translation][Loco] Make http requests synchronous when reading the Loco API
2 parents 93d97a1 + 56df45c commit 0f36bda

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

EventListener/AbstractSessionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function onKernelResponse(ResponseEvent $event)
141141
$sessionCookieHttpOnly = $this->sessionOptions['cookie_httponly'] ?? true;
142142
$sessionCookieSameSite = $this->sessionOptions['cookie_samesite'] ?? Cookie::SAMESITE_LAX;
143143

144-
SessionUtils::popSessionCookie($sessionName, $sessionCookiePath);
144+
SessionUtils::popSessionCookie($sessionName, $sessionId);
145145

146146
$request = $event->getRequest();
147147
$requestSessionCookieId = $request->cookies->get($sessionName);

Tests/EventListener/SessionListenerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,7 @@ public function testSessionUsageLogIfStatelessAndSessionUsed()
358358
public function testSessionIsSavedWhenUnexpectedSessionExceptionThrown()
359359
{
360360
$session = $this->createMock(Session::class);
361+
$session->expects($this->exactly(1))->method('getId')->willReturn('123456');
361362
$session->expects($this->exactly(1))->method('getName')->willReturn('PHPSESSID');
362363
$session->method('isStarted')->willReturn(true);
363364
$session->expects($this->once())->method('getUsageIndex')->willReturn(1);

0 commit comments

Comments
 (0)