src/Domain/Auth/Subscriber/GroupDeletedEventSubscriber.php line 25
<?phpnamespace App\Domain\Auth\Subscriber;use App\Domain\Auth\Event\GroupDeletedEvent;use App\Domain\Auth\Service\GroupService;use Symfony\Component\EventDispatcher\EventSubscriberInterface;class GroupDeletedEventSubscriber implements EventSubscriberInterface{private GroupService $service;public function __construct(GroupService $service){$this->service = $service;}public static function getSubscribedEvents(): array{return [GroupDeletedEvent::class => 'onDeleted',];}public function onDeleted(GroupDeletedEvent $event): void{$this->service->switchUser($event->getGroup());}}