[FrameworkBundle] Make debug:event-dispatcher search case insensitive
This commit is contained in:
parent
896f4a6eb6
commit
1e4c7d9c5d
@ -123,9 +123,10 @@ EOF
|
|||||||
private function searchForEvent(EventDispatcherInterface $dispatcher, $needle): array
|
private function searchForEvent(EventDispatcherInterface $dispatcher, $needle): array
|
||||||
{
|
{
|
||||||
$output = [];
|
$output = [];
|
||||||
|
$lcNeedle = strtolower($needle);
|
||||||
$allEvents = array_keys($dispatcher->getListeners());
|
$allEvents = array_keys($dispatcher->getListeners());
|
||||||
foreach ($allEvents as $event) {
|
foreach ($allEvents as $event) {
|
||||||
if (str_contains($event, $needle)) {
|
if (str_contains(strtolower($event), $lcNeedle)) {
|
||||||
$output[] = $event;
|
$output[] = $event;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user