8000 fix: unwrap if envelope · symfony/symfony@f0c6ca1 · GitHub
[go: up one dir, main page]

Skip to content

Commit f0c6ca1

Browse files
committed
fix: unwrap if envelope
1 parent c375406 commit f0c6ca1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Symfony/Component/Scheduler/Command/DebugCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Console\Input\InputInterface;
1818
use Symfony\Component\Console\Output\OutputInterface;
1919
use Symfony\Component\Console\Style\SymfonyStyle;
20+
use Symfony\Component\Messenger\Envelope;
2021
use Symfony\Component\Scheduler\RecurringMessage;
2122
use Symfony\Component\Scheduler\ScheduleProviderInterface;
2223
use Symfony\Contracts\Service\ServiceProviderInterface;
@@ -98,6 +99,10 @@ private static function renderRecurringMessage(RecurringMessage $recurringMessag
9899
$message = $recurringMessage->getMessage();
99100
$trigger = $recurringMessage->getTrigger();
100101

102+
if ($message instanceof Envelope) {
103+
$message = $message->getMessage();
104+
}
105+
101106
return [
102107
$message instanceof \Stringable ? (string) $message : (new \ReflectionClass($message))->getShortName(),
103108
$trigger instanceof \Stringable ? (string) $trigger : (new \ReflectionClass($trigger))->getShortName(),

0 commit comments

Comments
 (0)
0