verifyEmailHelper->generateSignature( $verifyEmailRouteName, (string) $user->(), (string) $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, $user): void { $this->verifyEmailHelper->validateEmailConfirmationFromRequest($request, (string) $user->(), (string) $user->()); $user->setVerified(true); $this->entityManager->persist($user); $this->entityManager->flush(); } }