8000 merged branch dlsniper/validator-deprecation (PR #6929) · 77web/symfony@4b75754 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b75754

Browse files
committed
merged branch dlsniper/validator-deprecation (PR symfony#6929)
This PR was merged into the master branch. Commits ------- d0341e8 Replaced call that triggers deprecated error Discussion ---------- [Validator][ChoiceValidator] Replaced call that triggers deprecated error | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | ~ | License | MIT | Doc PR | ~ This removes the deprecation warnings from the ChoiceValidator.
2 parents 6c00ffe + d0341e8 commit 4b75754

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Validator/Constraints/ChoiceValidator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ public function validate($value, Constraint $constraint)
4545
}
4646

4747
if ($constraint->callback) {
48-
if (is_callable(array($this->context->getCurrentClass(), $constraint->callback))) {
49-
$choices = call_user_func(array($this->context->getCurrentClass(), $constraint->callback));
48+
if (is_callable(array($this->context->getClassName(), $constraint->callback))) {
49+
$choices = call_user_func(array($this->context->getClassName(), $constraint->callback));
5050
} elseif (is_callable($constraint->callback)) {
5151
$choices = call_user_func($constraint->callback);
5252
} else {

0 commit comments

Comments
 (0)
0