From 4e1ba5553794e93461e44462ed1a1298170a68fe Mon Sep 17 00:00:00 2001 From: Link1515 Date: Thu, 2 Jan 2025 09:32:03 +0800 Subject: [PATCH] fix: modify Exception message parameter order --- .../Core/Validator/Constraints/UserPasswordValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php index 41670b27e0aea..79c7bd304b5e2 100644 --- a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php +++ b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPasswordValidator.php @@ -55,7 +55,7 @@ public function validate(mixed $password, Constraint $constraint) $user = $this->tokenStorage->getToken()->getUser(); if (!$user instanceof PasswordAuthenticatedUserInterface) { - throw new ConstraintDefinitionException(sprintf('The "%s" class must implement the "%s" interface.', PasswordAuthenticatedUserInterface::class, get_debug_type($user))); + throw new ConstraintDefinitionException(sprintf('The "%s" class must implement the "%s" interface.', get_debug_type($user), PasswordAuthenticatedUserInterface::class)); } $hasher = $this->hasherFactory->getPasswordHasher($user);