diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php index a8ac845ea2107..70d2e9cd59a70 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php @@ -123,9 +123,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int private function searchForEvent(EventDispatcherInterface $dispatcher, $needle): array { $output = []; + $lcNeedle = strtolower($needle); $allEvents = array_keys($dispatcher->getListeners()); foreach ($allEvents as $event) { - if (str_contains($event, $needle)) { + if (str_contains(strtolower($event), $lcNeedle)) { $output[] = $event; } }