Skip to content

Commit fb89f21

Browse files
committed
Merge branch '6.4' into 7.1
* 6.4: (23 commits) add translations for the Slug constraint [Messenger] Fix `TransportMessageIdStamp` not always added [DoctrineBridge] Fix compatibility to Doctrine persistence 2.5 in Doctrine Bridge 6.4 to avoid Projects stuck on 6.3 [PropertyInfo] Fix add missing composer conflict [ErrorHandler] Don't trigger "internal" deprecations for anonymous LazyClosure instances [VarDumper] Fix displaying closure's "this" from anonymous classes [Doctrine][Messenger] Prevents multiple TransportMessageIdStamp being stored in envelope [HttpKernel] Don't override existing LoggerInterface autowiring alias in LoggerPass reject inline notations followed by invalid content [Security] Fix triggering session tracking from ContextListener [AssetMapper] add leading slash to public prefix fix: modify Exception message parameter order [Yaml] Fix parsing of unquoted strings in Parser::lexUnquotedString() to ignore spaces Update exception.css Bump Symfony version to 6.4.18 Update VERSION for 6.4.17 Update CONTRIBUTORS for 6.4.17 Update CHANGELOG for 6.4.17 Fix exception thrown by YamlEncoder [AssetMapper] Fix JavaScript compiler create self-referencing imports ...
2 parents 4e0bc00 + 5f16d09 commit fb89f21

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Firewall/ContextListener.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ public function onKernelResponse(ResponseEvent $event): void
164164
$session = $request->getSession();
165165
$sessionId = $session->getId();
166166
$usageIndexValue = $session instanceof Session ? $usageIndexReference = &$session->getUsageIndex() : null;
167+
$usageIndexReference = \PHP_INT_MIN;
167168
$token = $this->tokenStorage->getToken();
168169

169170
if (!$this->trustResolver->isAuthenticated($token)) {
@@ -178,6 +179,8 @@ public function onKernelResponse(ResponseEvent $event): void
178179

179180
if ($this->sessionTrackerEnabler && $session->getId() === $sessionId) {
180181
$usageIndexReference = $usageIndexValue;
182+
} else {
183+
$usageIndexReference = $usageIndexReference - \PHP_INT_MIN + $usageIndexValue;
181184
}
182185
}
183186

Tests/Firewall/ContextListenerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,8 @@ public function testSessionIsNotReported()
323323

324324
$listener = new ContextListener($tokenStorage, [], 'context_key', null, null, null, $tokenStorage->getToken(...));
325325
$listener(new RequestEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST));
326+
327+
$listener->onKernelResponse(new ResponseEvent($this->createMock(HttpKernelInterface::class), $request, HttpKernelInterface::MAIN_REQUEST, new Response()));
326328
}
327329

328330
public function testOnKernelResponseRemoveListener()

0 commit comments

Comments
 (0)