Bug #4857

ValidatorResolver tries to use data type as validator type

Added by Karsten Dambekalns almost 13 years ago. Updated almost 12 years ago.

Status:
Resolved
Priority:
Must have
Category:
Validation
Start date:
2009-10-02
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

When buildMethodArgumentsValidatorConjunctions() iterates over method arguments, it tries to get a validator for each type. This works for simple types, but for objects the class name is used as validator directly. This is a) nonsense and b) causes circular dependency problems to begin with.

The problem is caused $typeValidator = $this->createValidator($methodParameter['type']);, since createValidator() expects to get either one of the internal validator shorthands or the fully qualified name of a validator - but not a data type!

Also available in: Atom PDF