verifyEmailHelper->generateSignature( $verifyEmailRouteName, $user->(), $user->() ); $context = $email->getContext(); $context['signedUrl'] = $signatureComponents->getSignedUrl(); $context['expiresAtMessageKey'] = $signatureComponents->getExpirationMessageKey(); $context['expiresAtMessageData'] = $signatureComponents->getExpirationMessageData(); $email->context($context); $this->mailer->send($email); } /** * @throws VerifyEmailExceptionInterface */ public function handleEmailConfirmation(Request $request, UserInterface $user): void { $this->verifyEmailHelper->validateEmailConfirmationFromRequest($request, $user->(), $user->()); $user->setIsVerified(true); $this->entityManager->persist($user); $this->entityManager->flush(); } }