Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e04298b

Browse filesBrowse files
Fix
1 parent e96f873 commit e04298b
Copy full SHA for e04298b

File tree

1 file changed

+5
-2
lines changed
Filter options

1 file changed

+5
-2
lines changed

‎src/Symfony/Component/Messenger/Middleware/LockMiddleware.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Messenger/Middleware/LockMiddleware.php
+5-2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Messenger\Middleware;
1313

14+
use Symfony\Component\Lock\Key;
1415
use Symfony\Component\Lock\LockFactory;
1516
use Symfony\Component\Messenger\Envelope;
1617
use Symfony\Component\Messenger\Message\LockableMessageInterface;
@@ -39,9 +40,11 @@ public function handle(Envelope $envelope, StackInterface $stack): Envelope
3940
if (null === $envelope->last(ReceivedStamp::class)) {
4041
if ($message instanceof LockableMessageInterface) {
4142
// If we're trying to dispatch a lockable message.
42-
$key = $message->getKey();
43+
$keyResource = $message->getKey();
44+
45+
if (null !== $keyResource) {
46+
$key = new Key($keyResource);
4347

44-
if (null !== $key) {
4548
// The acquire call must be done before stamping the message
4649
// in order to have the full state of the key in the stamp.
4750
$lock = $message instanceof TTLAwareLockableMessageInterface

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.