[Validator] Remove property and method targets from the optional and required constraints.

At the moment both constraints can only be defined on other annotations (specifically, the Collection annotation). Defining the required or optional annotation directly on a field or method throws a ClassNotFoundException, since the constraint validator factory tries to load the validator (which does not exist).
This commit is contained in:
Jakub Zalas 2014-05-29 08:58:28 +01:00
parent cff410507f
commit 9c2616e788
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\Validator\Constraints;
/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
* @Target({"ANNOTATION"})
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/

View File

@ -13,7 +13,7 @@ namespace Symfony\Component\Validator\Constraints;
/**
* @Annotation
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
* @Target({"ANNOTATION"})
*
* @author Bernhard Schussek <bschussek@gmail.com>
*/