Skip to content

Commit

Permalink
Fix deprecation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Coderberg committed Apr 24, 2024
1 parent 9d44088 commit db2de01
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Service/Auth/EmailVerifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\Request;
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
use SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface;

final readonly class EmailVerifier
Expand All @@ -18,12 +17,13 @@ public function __construct(
{
}

/**
* @throws VerifyEmailExceptionInterface
*/
public function handleEmailConfirmation(Request $request, User $user): void
{
$this->verifyEmailHelper->validateEmailConfirmation($request->getUri(), (string) $user->getId(), $user->getEmail());
$this->verifyEmailHelper->validateEmailConfirmationFromRequest(
request: $request,
userId: (string) $user->getId(),
userEmail: $user->getEmail()
);

$user->setEmailVerifiedAt(new \DateTime('now'));

Expand Down

0 comments on commit db2de01

Please sign in to comment.