Bug #6992

ValidatorResolver does not build certain validators

Added by Robert Lemke over 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Must have
Assignee:
Category:
Validation
Start date:
2010-03-18
Due date:
% Done:

100%

Estimated time:
10.00 h
PHP Version:
Has patch:
Complexity:

Description

If object types are specified with a leading backslash, for example in a model:

    /**
     * @var \F3\Party\Domain\Model\PersonName
     */
    protected $name;

... then they are not recognized by the validator resolver because it checks if an object with exactly that name is registered at the Object Manager. However, fully qualified class names must not start with a leading backslash when used in a string – therefore the Object Manager doesn't know such an object.

Therefore resolveValidatorObjectName() should strip a leading backslash from the given type, should one exist.

Associated revisions

Revision 977b835b (diff)
Added by Robert Lemke over 9 years ago

[~FEATuRE] FLOW3 (Error): Adjusted the class name filter of the var_dump method, so that Request and Response for example are still displayed.
[+BUGFIX] FLOW3 (Validation): The Validator Resolver now correctly handles fully qualified class names with a leading backslash specified in annotations. Fixes #6992 (boy, that was hard to find ...)

History

#1 Updated by Robert Lemke over 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

Applied in changeset r4012.

Also available in: Atom PDF