Skip to content

Commit 727463a

Browse files
authored
fix(symfony)!: context stamp not serializable because of request object (#6323)
BREAKING CHANGE: unset request object from context array passed to the context stamp
1 parent ccdb4ae commit 727463a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Messenger/ContextStamp.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ final class ContextStamp implements StampInterface
2727

2828
public function __construct(array $context = [])
2929
{
30-
if (($request = ($context['request'] ?? null)) && $request instanceof Request && $request->hasSession()) {
30+
/* Symfony does not guarantee that the Request object is serializable */
31+
if (($request = ($context['request'] ?? null)) && $request instanceof Request) {
3132
unset($context['request']);
3233
}
3334

0 commit comments

Comments
 (0)