|
@@ -45,7 +45,7 @@ class CallbackValidator extends ConstraintValidator
|
|
$propertyPath = $context->getPropertyPath();
|
|
$propertyPath = $context->getPropertyPath();
|
|
|
|
|
|
foreach ($methods as $method) {
|
|
foreach ($methods as $method) {
|
|
- if (is_array($method)) {
|
|
|
|
|
|
+ if (is_array($method) || $method instanceof \Closure) {
|
|
if (!is_callable($method)) {
|
|
if (!is_callable($method)) {
|
|
throw new ConstraintDefinitionException(sprintf('"%s::%s" targeted by Callback constraint is not a valid callable', $method[0], $method[1]));
|
|
throw new ConstraintDefinitionException(sprintf('"%s::%s" targeted by Callback constraint is not a valid callable', $method[0], $method[1]));
|
|
}
|
|
}
|