<?phpnamespace App\EventSubscriber;use Symfony\Component\EventDispatcher\EventSubscriberInterface;use Symfony\Component\Security\Http\Event\SwitchUserEvent;use Symfony\Component\Security\Http\SecurityEvents;class SwitchUserSubscriber implements EventSubscriberInterface{ public function onSwitchUser(SwitchUserEvent $event): void { } public static function getSubscribedEvents(): array { return [ // constant for security.switch_user SecurityEvents::SWITCH_USER => 'onSwitchUser', ]; }}