This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Validator
Fabien Potencier ee5d7fdacf bug #30737 [Validator] Improve constraint default option check (vudaltsov)
This PR was squashed before being merged into the 3.4 branch (closes #30737).

Discussion
----------

[Validator] Improve constraint default option check

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Any constraint without default option used as annotation with unnamed first argument (for example, `@Assert\Collection(1)`) throws an exception with an ugly message `The options "" do not exist in constraint Collection`.

This PR makes constraint check the default option in the annotation case in the same way it checks it in the "real" code case. So the exception will be `No default option is configured for constraint Collection.`

Commits
-------

915912e18e [Validator] Improve constraint default option check
2019-03-29 18:25:59 +01:00
..
Constraints [Validator] Fix annotation default for @Count and @Length 2019-03-29 16:49:31 +01:00
Context fixed short array CS in comments 2019-01-16 14:27:11 +01:00
DataCollector switched array() to [] 2019-01-16 10:39:14 +01:00
DependencyInjection switched array() to [] 2019-01-16 10:39:14 +01:00
Exception Enable the fixer enforcing fully-qualified calls for compiler-optimized functions 2018-07-24 12:05:38 +02:00
Mapping Fix Cache error while using anonymous class 2019-03-15 14:32:44 +01:00
Resources/translations Add missing "vi" translations 2019-03-27 09:06:48 +07:00
Test cs fix 2019-03-10 11:07:44 +01:00
Tests bug #30737 [Validator] Improve constraint default option check (vudaltsov) 2019-03-29 18:25:59 +01:00
Util CS: apply rules 2016-11-03 08:44:53 +01:00
Validator switched array() to [] 2019-01-16 10:39:14 +01:00
Violation Merge branch '2.7' into 2.8 2017-12-31 05:16:51 +01:00
.gitignore
CHANGELOG.md feature #21111 [Validator] add groups support to the Valid constraint (xabbuh) 2017-08-05 19:39:51 +02:00
composer.json Merge branch '2.8' into 3.4 2018-05-01 15:53:27 -07:00
Constraint.php [Validator] Improve constraint default option check 2019-03-29 18:25:52 +01:00
ConstraintValidator.php Merge branch '2.8' into 3.4 2018-07-26 10:45:46 +02:00
ConstraintValidatorFactory.php switched array() to [] 2019-01-16 10:39:14 +01:00
ConstraintValidatorFactoryInterface.php [DI] minor docblock fixes 2017-10-24 13:40:19 +02:00
ConstraintValidatorInterface.php [Validator] removed deprecated methods 2015-10-01 16:20:47 +02:00
ConstraintViolation.php bug #29375 [Validator] Allow ConstraintViolation::__toString() to expose codes that are not null or emtpy strings (phansys) 2018-12-01 09:21:59 +01:00
ConstraintViolationInterface.php Merge branch '2.8' into 3.4 2018-09-02 19:11:59 +02:00
ConstraintViolationList.php switched array() to [] 2019-01-16 10:39:14 +01:00
ConstraintViolationListInterface.php switched array() to [] 2019-01-16 10:39:14 +01:00
ContainerConstraintValidatorFactory.php Fixed exception wording 2019-01-11 17:00:45 +03:00
GroupSequenceProviderInterface.php improve docblocks around group sequences 2018-09-25 10:06:01 +02:00
LICENSE update year in license files 2019-01-01 14:45:19 +01:00
ObjectInitializerInterface.php [Validator] make phpdoc of ObjectInitializerInterface interface more accurate 2018-05-02 00:50:12 +02:00
phpunit.xml.dist Bump phpunit XSD version to 5.2 2018-11-11 12:18:13 +01:00
README.md Update documentation link to the component 2016-11-25 11:12:25 +01:00
Validation.php [CS] Apply phpdoc_annotation_without_dot 2017-09-11 13:37:52 -07:00
ValidatorBuilder.php switched array() to [] 2019-01-16 10:39:14 +01:00
ValidatorBuilderInterface.php Merge branch '2.8' into 3.3 2017-10-24 16:05:06 +02:00

Validator Component

The Validator component provides tools to validate values following the JSR-303 Bean Validation specification.

Resources