[Messenger] Add `$stamps` parameter to `HandleTrait::handle`

by @alexander-schranz

Some issues have been detected in this pull request

0
Coding Standard

0
Common Typos

0
License Headers

0
Pull Request Contributor Headers

0
File Permissions

0
Merge Commits

Issues that can be fixed by applying a patch

Review the proposed patch then download it to apply it manually or execute the following command from the repository root directory:

curl https://fabbot.io/patch/symfony/symfony/42124/277b183bc694af069b09148746c62e169b2439f4/exception_messages.diff | patch -p0
diff -ru src/Symfony/Component/Messenger/HandleTrait.php src/Symfony/Component/Messenger/HandleTrait.php
--- src/Symfony/Component/Messenger/HandleTrait.php	2025-03-10 18:45:27.291624221 +0000
+++ src/Symfony/Component/Messenger/HandleTrait.php	2025-03-10 18:45:28.589627019 +0000
@@ -50,7 +50,7 @@
         if (\count($handledStamps) > 1) {
             $handlers = implode(', ', array_map(fn (HandledStamp $stamp): string => \sprintf('"%s"', $stamp->getHandlerName()), $handledStamps));
 
-            throw new LogicException(\sprintf('Message of type "%s" was handled multiple times. Only one handler is expected when using "%s::%s()", got %d: %s.', get_debug_type($envelope->getMessage()), static::class, __FUNCTION__, \count($handledStamps), $handlers));
+            throw new LogicException(\sprintf('Message of type "%s" was handled multiple times. Only one handler is expected when using "%s::%s()", got %d: "%s".', get_debug_type($envelope->getMessage()), static::class, __FUNCTION__, \count($handledStamps), $handlers));
         }
 
         return $handledStamps[0]->getResult();

0
Usage of void in test files

0
Use ::class whenever possible

0
Deprecation Messages