[Validator][callback constraint] include class name in ConstraintDefinitionException.
This commit is contained in:
parent
f5d5a3be96
commit
51212acbff
@ -60,7 +60,7 @@ class CallbackValidator extends ConstraintValidator
|
||||
call_user_func($method, $object, $this->context);
|
||||
} elseif (null !== $object) {
|
||||
if (!method_exists($object, $method)) {
|
||||
throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist', $method));
|
||||
throw new ConstraintDefinitionException(sprintf('Method "%s" targeted by Callback constraint does not exist in class %s', $method, get_class($object)));
|
||||
}
|
||||
|
||||
$reflMethod = new \ReflectionMethod($object, $method);
|
||||
|
Reference in New Issue
Block a user