*/ class PasswordUpdatedListener implements IEventListener { public function __construct( private readonly IVerificationToken $verificationToken, ) { } public function handle(Event $event): void { if ($event instanceof PasswordUpdatedEvent) { $this->verificationToken->delete('', $event->getUser(), 'lostpassword'); } } }