7 * added the BIC (SWIFT-Code) validator
12 * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator`
13 * deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent
18 * [BC BREAK] `FileValidator` disallow empty files
19 * [BC BREAK] `UserPasswordValidator` source message change
20 * [BC BREAK] added internal `ExecutionContextInterface::setConstraint()`
21 * added `ConstraintViolation::getConstraint()`
22 * [BC BREAK] The `ExpressionValidator` will now evaluate the Expression even when the property value is null or an empty string
23 * deprecated `ClassMetadata::hasMemberMetadatas()`
24 * deprecated `ClassMetadata::getMemberMetadatas()`
25 * deprecated `ClassMetadata::addMemberMetadata()`
26 * [BC BREAK] added `Mapping\MetadataInterface::getConstraints()`
27 * added generic "payload" option to all constraints for attaching domain-specific data
28 * [BC BREAK] added `ConstraintViolationBuilderInterface::setCause()`
33 * deprecated `ApcCache` in favor of `DoctrineCache`
34 * added `DoctrineCache` to adapt any Doctrine cache
35 * `GroupSequence` now implements `ArrayAccess`, `Countable` and `Traversable`
36 * [BC BREAK] changed `ClassMetadata::getGroupSequence()` to return a `GroupSequence` instance instead of an array
37 * `Callback` can now be put onto properties (useful when you pass a closure to the constraint)
38 * deprecated `ClassBasedInterface`
39 * deprecated `MetadataInterface`
40 * deprecated `PropertyMetadataInterface`
41 * deprecated `PropertyMetadataContainerInterface`
42 * deprecated `Mapping\ElementMetadata`
43 * added `Mapping\MetadataInterface`
44 * added `Mapping\ClassMetadataInterface`
45 * added `Mapping\PropertyMetadataInterface`
46 * added `Mapping\GenericMetadata`
47 * added `Mapping\CascadingStrategy`
48 * added `Mapping\TraversalStrategy`
49 * deprecated `Mapping\ClassMetadata::accept()`
50 * deprecated `Mapping\MemberMetadata::accept()`
51 * removed array type hint of `Mapping\ClassMetadata::setGroupSequence()`
52 * deprecated `MetadataFactoryInterface`
53 * deprecated `Mapping\BlackholeMetadataFactory`
54 * deprecated `Mapping\ClassMetadataFactory`
55 * added `Mapping\Factory\MetadataFactoryInterface`
56 * added `Mapping\Factory\BlackHoleMetadataFactory`
57 * added `Mapping\Factory\LazyLoadingMetadataFactory`
58 * deprecated `ExecutionContextInterface`
59 * deprecated `ExecutionContext`
60 * deprecated `GlobalExecutionContextInterface`
61 * added `Context\ExecutionContextInterface`
62 * added `Context\ExecutionContext`
63 * added `Context\ExecutionContextFactoryInterface`
64 * added `Context\ExecutionContextFactory`
65 * deprecated `ValidatorInterface`
66 * deprecated `Validator`
67 * deprecated `ValidationVisitorInterface`
68 * deprecated `ValidationVisitor`
69 * added `Validator\ValidatorInterface`
70 * added `Validator\RecursiveValidator`
71 * added `Validator\ContextualValidatorInterface`
72 * added `Validator\RecursiveContextualValidator`
73 * added `Violation\ConstraintViolationBuilderInterface`
74 * added `Violation\ConstraintViolationBuilder`
75 * added `ConstraintViolation::getParameters()`
76 * added `ConstraintViolation::getPlural()`
77 * added `Constraints\Traverse`
78 * deprecated `$deep` property in `Constraints\Valid`
79 * added `ValidatorBuilderInterface::setApiVersion()`
80 * added `Validation::API_VERSION_2_4`
81 * added `Validation::API_VERSION_2_5`
82 * added `Exception\OutOfBoundsException`
83 * added `Exception\UnsupportedMetadataException`
84 * made `Exception\ValidatorException` extend `Exception\RuntimeException`
85 * added `Util\PropertyPath`
86 * made the PropertyAccess component an optional dependency
87 * deprecated `ValidatorBuilder::setPropertyAccessor()`
88 * deprecated `validate` and `validateValue` on `Validator\Context\ExecutionContext` use `getValidator()` together with `inContext()` instead
93 * added a constraint the uses the expression language
94 * added `minRatio`, `maxRatio`, `allowSquare`, `allowLandscape`, and `allowPortrait` to Image validator
99 * fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
104 * added the ISBN, ISSN, and IBAN validators
105 * copied the constraints `Optional` and `Required` to the
106 `Symfony\Component\Validator\Constraints\` namespace and deprecated the original
108 * added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo)
113 * added a CardScheme validator
114 * added a Luhn validator
115 * moved @api-tags from `Validator` to `ValidatorInterface`
116 * moved @api-tags from `ConstraintViolation` to the new `ConstraintViolationInterface`
117 * moved @api-tags from `ConstraintViolationList` to the new `ConstraintViolationListInterface`
118 * moved @api-tags from `ExecutionContext` to the new `ExecutionContextInterface`
119 * [BC BREAK] `ConstraintValidatorInterface::initialize` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext`
120 * [BC BREAK] changed the visibility of the properties in `Validator` from protected to private
121 * deprecated `ClassMetadataFactoryInterface` in favor of the new `MetadataFactoryInterface`
122 * deprecated `ClassMetadataFactory::getClassMetadata` in favor of `getMetadataFor`
123 * created `MetadataInterface`, `PropertyMetadataInterface`, `ClassBasedInterface` and `PropertyMetadataContainerInterface`
124 * deprecated `GraphWalker` in favor of the new `ValidationVisitorInterface`
125 * deprecated `ExecutionContext::addViolationAtPath`
126 * deprecated `ExecutionContext::addViolationAtSubPath` in favor of `ExecutionContextInterface::addViolationAt`
127 * deprecated `ExecutionContext::getCurrentClass` in favor of `ExecutionContextInterface::getClassName`
128 * deprecated `ExecutionContext::getCurrentProperty` in favor of `ExecutionContextInterface::getPropertyName`
129 * deprecated `ExecutionContext::getCurrentValue` in favor of `ExecutionContextInterface::getValue`
130 * deprecated `ExecutionContext::getGraphWalker` in favor of `ExecutionContextInterface::validate` and `ExecutionContextInterface::validateValue`
131 * improved `ValidatorInterface::validateValue` to accept arrays of constraints
132 * changed `ValidatorInterface::getMetadataFactory` to return a `MetadataFactoryInterface` instead of a `ClassMetadataFactoryInterface`
133 * removed `ClassMetadataFactoryInterface` type hint from `ValidatorBuilderInterface::setMetadataFactory`.
134 As of Symfony 2.3, this method will be typed against `MetadataFactoryInterface` instead.
135 * [BC BREAK] the switches `traverse` and `deep` in the `Valid` constraint and in `GraphWalker::walkReference`
136 are ignored for arrays now. Arrays are always traversed recursively.
137 * added dependency to Translation component
138 * violation messages are now translated with a TranslatorInterface implementation
139 * [BC BREAK] inserted argument `$message` in the constructor of `ConstraintViolation`
140 * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ExecutionContext`
141 * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `GraphWalker`
142 * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ValidationVisitor`
143 * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `Validator`
144 * [BC BREAK] added `setTranslator()` and `setTranslationDomain()` to `ValidatorBuilderInterface`
145 * improved the Validator to support pluralized messages by default
146 * [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version
147 * added ExceptionInterface, BadMethodCallException and InvalidArgumentException
152 * added support for `ctype_*` assertions in `TypeValidator`
153 * improved the ImageValidator with min width, max width, min height, and max height constraints
154 * added support for MIME with wildcard in FileValidator
155 * changed Collection validator to add "missing" and "extra" errors to
157 * changed default value for `extraFieldsMessage` and `missingFieldsMessage`
158 in Collection constraint
159 * made ExecutionContext immutable
160 * deprecated Constraint methods `setMessage`, `getMessageTemplate` and
161 `getMessageParameters`
162 * added support for dynamic group sequences with the GroupSequenceProvider pattern
163 * [BC BREAK] ConstraintValidatorInterface method `isValid` has been renamed to
164 `validate`, its return value was dropped. ConstraintValidator still contains
166 * [BC BREAK] collections in fields annotated with `Valid` are not traversed
167 recursively anymore by default. `Valid` contains a new property `deep`
168 which enables the BC behavior.
169 * added Count constraint
170 * added Length constraint
171 * added Range constraint
172 * deprecated the Min and Max constraints
173 * deprecated the MinLength and MaxLength constraints
174 * added Validation and ValidatorBuilderInterface
175 * deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory