From 2114101eac7d26a662c5fbc241d9694907bb7357 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Fri, 23 Feb 2024 11:13:23 -0500 Subject: [PATCH 1/2] [Config][Messenger][Security] Don't turn deprecations into exceptions when unserializing --- Transport/Serialization/PhpSerializer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Transport/Serialization/PhpSerializer.php b/Transport/Serialization/PhpSerializer.php index 17db0296..0af44fd3 100644 --- a/Transport/Serialization/PhpSerializer.php +++ b/Transport/Serialization/PhpSerializer.php @@ -58,7 +58,7 @@ private function safelyUnserialize(string $contents) $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback'); $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { - if (__FILE__ === $file) { + if (__FILE__ === $file && !\in_array($type, [\E_DEPRECATED, \E_USER_DEPRECATED], true)) { throw new \ErrorException($msg, 0, $type, $file, $line); } From 4cffc0474666542e14682f37468143b3256d2d74 Mon Sep 17 00:00:00 2001 From: "Roland Franssen :)" Date: Sat, 24 Feb 2024 18:14:30 +0100 Subject: [PATCH 2/2] [Messenger] Revert "Resend failed retries back to failure transport " Reverts #51848 --- .../SendFailedMessageToFailureTransportListener.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/EventListener/SendFailedMessageToFailureTransportListener.php b/EventListener/SendFailedMessageToFailureTransportListener.php index 2c474717..18b25519 100644 --- a/EventListener/SendFailedMessageToFailureTransportListener.php +++ b/EventListener/SendFailedMessageToFailureTransportListener.php @@ -52,6 +52,11 @@ public function onMessageFailed(WorkerMessageFailedEvent $event) $envelope = $event->getEnvelope(); + // avoid re-sending to the failed sender + if (null !== $envelope->last(SentToFailureTransportStamp::class)) { + return; + } + $envelope = $envelope->with( new SentToFailureTransportStamp($event->getReceiverName()), new DelayStamp(0),