8000 [Form] Removed legacy check in `ValidationListener` · symfony/symfony@74ed566 · GitHub
[go: up one dir, main page]

Skip to content

Commit 74ed566

Browse files
committed
[Form] Removed legacy check in ValidationListener
1 parent 5da141b commit 74ed566

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Symfony/Component/Form/Extension/Validator/EventListener/ValidationListener.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ public function validateForm(FormEvent $event)
5555
foreach ($this->validator->validate($form) as $violation) {
5656
// Allow the "invalid" constraint to be put onto
5757
// non-synchronized forms
58-
// ConstraintViolation::getConstraint() must not expect to provide a constraint as long as Symfony\Component\Validator\ExecutionContext exists (before 3.0)
59-
$allowNonSynchronized = (null === $violation->getConstraint() || $violation->getConstraint() instanceof Form) && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
58+
$allowNonSynchronized = $violation->getConstraint() instanceof Form && Form::NOT_SYNCHRONIZED_ERROR === $violation->getCode();
6059

6160
$this->violationMapper->mapViolation($violation, $form, $allowNonSynchronized);
6261
}

0 commit comments

Comments
 (0)
0