mirror of
https://github.com/symfony/symfony-docs.git
synced 2026-03-24 00:32:14 +01:00
minor #21741 Fix typo invalid exception type (qdequippe)
This PR was submitted for the 8.0 branch but it was squashed and merged into the 6.4 branch instead.
Discussion
----------
Fix typo invalid exception type
Commits
-------
4fb631e00 Fix typo invalid exception type
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user