Fix typo invalid exception type

This commit is contained in:
Quentin Dequippe
2026-01-21 11:55:03 +01:00
committed by Javier Eguiluz
parent c8b887eede
commit 4fb631e00f

View File

@@ -463,6 +463,7 @@ Now, the constraint validator will get an object as the first argument to
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Exception\UnexpectedValueException;
class ConfirmedPaymentReceiptValidator extends ConstraintValidator
@@ -477,7 +478,7 @@ Now, the constraint validator will get an object as the first argument to
}
if (!$constraint instanceof ConfirmedPaymentReceipt) {
throw new UnexpectedValueException($constraint, ConfirmedPaymentReceipt::class);
throw new UnexpectedTypeException($constraint, ConfirmedPaymentReceipt::class);
}
$receiptEmail = $receipt->getPayload()['email'] ?? null;