A) In VerifyEmailHelper, deprecate the first argument of validateEmailConfirmation() from being a string and now force it to be a Request object. IF a Request is passed, use UriSigner::checkRequest().
B) Update MakerBundle to pass in the Request object.
In MakerBundle, during verification, we use
$request->getUri()
to get the URL to validation - https://github.com/symfony/maker-bundle/blob/main/src/Resources/skeleton/verifyEmail/EmailVerifier.tpl.php#L44However,
UriSigner
has acheckRequest()
method, which is simpler - and it also gets the URL in a different way, purposely avoidinggetUri()
: https://github.com/symfony/symfony/blob/7.1/src/Symfony/Component/HttpFoundation/UriSigner.php#L78-L84We should:
A) In
VerifyEmailHelper
, deprecate the first argument ofvalidateEmailConfirmation()
from being astring
and now force it to be aRequest
object. IF aRequest
is passed, useUriSigner::checkRequest()
.B) Update MakerBundle to pass in the
Request
object.