Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [Messenger] Revert "Resend failed retries back to failure transport "
  [Config][Messenger][Security] Don't turn deprecations into exceptions when unserializing
  [FrameworkBundle] Merge test from 5.4
  • Loading branch information
fabpot committed Feb 26, 2024
2 parents 6271373 + 443b264 commit 804a899
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions EventListener/SendFailedMessageToFailureTransportListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,11 @@ public function onMessageFailed(WorkerMessageFailedEvent $event): void

$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),
Expand Down
2 changes: 1 addition & 1 deletion Transport/Serialization/PhpSerializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private function safelyUnserialize(string $contents): Envelope
$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);
}

Expand Down

0 comments on commit 804a899

Please sign in to comment.