Skip to content

Commit 6e1b446

Browse files
committed
Merge branch '6.4' into 7.0
* 6.4: (29 commits) fix tests add missing method fix merge fix test fix merge fix test change test to use a real ObjectManager [Mailer] Document the usage of custom headers in Infobip bridge [SecurityBundle] Add `provider` XML attribute to the authenticators it’s missing from [DoctrineBridge] Test reset with a true manager Sync php-cs-fixer config file with 7.2 [HttpClient] Fix parsing SSE [Notifier] Fix thread key in GoogleChat bridge [HttpKernel][Security] Fix accessing session for stateless request [Serializer] Fix `ObjectNormalizer` with property path test handling of special "value" constraint option [PhpUnitBridge] Add missing import [FrameworkBundle] Fix setting default context for certain normalizers [57251] Missing translations for Romanian (ro) [ErrorHandler] Fix rendered exception code highlighting on PHP 8.3 ...
2 parents 2015511 + b20d5c8 commit 6e1b446

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

DataCollector/RequestDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function collect(Request $request, Response $response, ?\Throwable $excep
6363
$sessionMetadata = [];
6464
$sessionAttributes = [];
6565
$flashes = [];
66-
if ($request->hasSession()) {
66+
if (!$request->attributes->getBoolean('_stateless') && $request->hasSession()) {
6767
$session = $request->getSession();
6868
if ($session->isStarted()) {
6969
$sessionMetadata['Created'] = date(\DATE_RFC822, $session->getMetadataBag()->getCreated());

Event/KernelEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Contracts\EventDispatcher\Event;
1717

1818
/**
19-
* Base class for events thrown in the HttpKernel component.
19+
* Base class for events dispatched in the HttpKernel component.
2020
*
2121
* @author Bernhard Schussek <[email protected]>
2222
*/

EventListener/ProfilerListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function onKernelResponse(ResponseEvent $event): void
9797
return;
9898
}
9999

100-
$session = $request->hasPreviousSession() ? $request->getSession() : null;
100+
$session = !$request->attributes->getBoolean('_stateless') && $request->hasPreviousSession() ? $request->getSession() : null;
101101

102102
if ($session instanceof Session) {
103103
$usageIndexValue = $usageIndexReference = &$session->getUsageIndex();

Tests/EventListener/ProfilerListenerTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ public function testKernelTerminate()
4040
->willReturn($profile);
4141

4242
$kernel = $this->createMock(HttpKernelInterface::class);
43-
$mainRequest = $this->createMock(Request::class);
44-
$subRequest = $this->createMock(Request::class);
43+
$mainRequest = new Request();
44+
$subRequest = new Request();
4545
$response = $this->createMock(Response::class);
4646

4747
$requestStack = new RequestStack();

0 commit comments

Comments
 (0)