From 1e4c7d9c5de43a03a1f4bfbef96e41605782aa61 Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 26 Apr 2021 16:11:51 +0200 Subject: [PATCH] [FrameworkBundle] Make debug:event-dispatcher search case insensitive --- .../FrameworkBundle/Command/EventDispatcherDebugCommand.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; } }