diff --git a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php index adea535a7e6ae..3bf4f81c03f7c 100644 --- a/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php +++ b/src/Symfony/Component/Messenger/Command/FailedMessagesRetryCommand.php @@ -158,11 +158,7 @@ private function runInteractive(string $failureTransportName, SymfonyStyle $io, // transports (like Doctrine), will cause the message // to be temporarily "acked", even if the user aborts // handling the message - while (true) { - if ($this->shouldStop) { - break; - } - + while (!$this->shouldStop) { $envelopes = []; $this->phpSerializer?->acceptPhpIncompleteClass(); try {