Open Kstein-yandex-ru opened 7 months ago
Did you do composer require symfonycasts/verify-email-bundle
?
Did you do
composer require symfonycasts/verify-email-bundle
?
Yes, I did. Otherwise, I think, I would not have this file: Security/EmailVerifier.php
Is the code working in PHP? I don't use vscode as my IDE, but this smells like a cache issue (for the ide).
try bin/console cache:clear
- If there is an autowiring or autoconfigure issue - an exception should be thrown by Symfony when you clear the app cache.
Is the code working in PHP? I don't use vscode as my IDE, but this smells like a cache issue (for the ide).
try
bin/console cache:clear
- If there is an autowiring or autoconfigure issue - an exception should be thrown by Symfony when you clear the app cache.
Thank you for advice.
I recieve confirmation email, but after folowwing the link, I see the mistake:
The link to verify your email is invalid. Please request a new link.
Cleared cache successfully without any warnings.
I've just tested with a new Symfony 6.4 and php 8.2 project, and I have no problem. I cannot reproduce this bug.
My version of symfonycasts/verify-email-bundle
is v1.17.0
If someone have time to look at the code: https://github.com/Kstein-yandex-ru/fund-agragator/tree/master
I've just tested your project by simulating a dev environment, i.e. with a local SMTP server, and I've had no problems.
My email is valid and set is_verified
to true
for the user.
You may have a problem with your SMTP server
I've just tested your project by simulating a dev environment, i.e. with a local SMTP server, and I've had no problems.
My email is valid and set
is_verified
totrue
for the user.You may have a problem with your SMTP server
Thank you. So i hope, after deploying it will work. I use Openserver. May be that is the reason. But I recieve emails, so SMTP seems to be set up correctly. Or can the link be broken by mail service (Yandex)?
Error when clicking on the link: The link to verify your email is invalid. Please request a new link.
Link address: .../public/verify/email?expires=1714556381&id=6&signature=B1aR%2BQkz19d2Dchre8DFypMdwuQsI6x0ftxUuZ a6CWA%3D&token=UkASyA68lh94wZ9ztJHNZCE%2B49EKgbN75rHPqzIwG%2Fk% 3D
I have not changed standard files.
But I noticed that in the file Security/EmailVerifier.php d in VS Code this line is underlined in red:
private VerifyEmailHelperInterface $verifyEmailHelper,
Error:
syntax error, unexpected 'private' (T_PRIVATE), expecting variable (T_VARIABLE)
And in the file Security/LoginFormAuthenticator.php it is underlined with the same error:
public function __construct(private UrlGeneratorInterface $urlGenerator)
PHP version 8.1
I also found on the Internet that you need to add |raw to the variable in the template, but I already have it.
Thank you in advance.