Chris@0: CHANGELOG Chris@0: ========= Chris@0: Chris@14: 3.4.0 Chris@14: ----- Chris@14: Chris@14: * added support for validation groups to the `Valid` constraint Chris@14: * not setting the `strict` option of the `Choice` constraint to `true` is Chris@14: deprecated and will throw an exception in Symfony 4.0 Chris@14: * setting the `checkDNS` option of the `Url` constraint to `true` is deprecated in favor of Chris@14: the `Url::CHECK_DNS_TYPE_*` constants values and will throw an exception in Symfony 4.0 Chris@14: * added min/max amount of pixels check to `Image` constraint via `minPixels` and `maxPixels` Chris@14: * added a new "propertyPath" option to comparison constraints in order to get the value to compare from an array or object Chris@14: Chris@14: 3.3.0 Chris@14: ----- Chris@14: Chris@14: * added `AddValidatorInitializersPass` Chris@14: * added `AddConstraintValidatorsPass` Chris@14: * added `ContainerConstraintValidatorFactory` Chris@14: Chris@0: 3.2.0 Chris@0: ----- Chris@0: Chris@0: * deprecated `Tests\Constraints\AbstractContraintValidatorTest` in favor of `Test\ConstraintValidatorTestCase` Chris@14: * added support for PHP constants in YAML configuration files Chris@0: Chris@0: 3.1.0 Chris@0: ----- Chris@0: Chris@0: * deprecated `DateTimeValidator::PATTERN` constant Chris@0: * added a `format` option to the `DateTime` constraint Chris@0: Chris@0: 2.8.0 Chris@0: ----- Chris@0: Chris@0: * added the BIC (SWIFT-Code) validator Chris@0: Chris@0: 2.7.0 Chris@0: ----- Chris@0: Chris@0: * deprecated `DefaultTranslator` in favor of `Symfony\Component\Translation\IdentityTranslator` Chris@0: * deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their `Is`-prefixed equivalent Chris@0: Chris@0: 2.6.0 Chris@0: ----- Chris@0: Chris@0: * [BC BREAK] `FileValidator` disallow empty files Chris@0: * [BC BREAK] `UserPasswordValidator` source message change Chris@0: * [BC BREAK] added internal `ExecutionContextInterface::setConstraint()` Chris@0: * added `ConstraintViolation::getConstraint()` Chris@0: * [BC BREAK] The `ExpressionValidator` will now evaluate the Expression even when the property value is null or an empty string Chris@0: * deprecated `ClassMetadata::hasMemberMetadatas()` Chris@0: * deprecated `ClassMetadata::getMemberMetadatas()` Chris@0: * deprecated `ClassMetadata::addMemberMetadata()` Chris@0: * [BC BREAK] added `Mapping\MetadataInterface::getConstraints()` Chris@0: * added generic "payload" option to all constraints for attaching domain-specific data Chris@0: * [BC BREAK] added `ConstraintViolationBuilderInterface::setCause()` Chris@0: Chris@0: 2.5.0 Chris@0: ----- Chris@0: Chris@0: * deprecated `ApcCache` in favor of `DoctrineCache` Chris@0: * added `DoctrineCache` to adapt any Doctrine cache Chris@0: * `GroupSequence` now implements `ArrayAccess`, `Countable` and `Traversable` Chris@0: * [BC BREAK] changed `ClassMetadata::getGroupSequence()` to return a `GroupSequence` instance instead of an array Chris@0: * `Callback` can now be put onto properties (useful when you pass a closure to the constraint) Chris@0: * deprecated `ClassBasedInterface` Chris@0: * deprecated `MetadataInterface` Chris@0: * deprecated `PropertyMetadataInterface` Chris@0: * deprecated `PropertyMetadataContainerInterface` Chris@0: * deprecated `Mapping\ElementMetadata` Chris@0: * added `Mapping\MetadataInterface` Chris@0: * added `Mapping\ClassMetadataInterface` Chris@0: * added `Mapping\PropertyMetadataInterface` Chris@0: * added `Mapping\GenericMetadata` Chris@0: * added `Mapping\CascadingStrategy` Chris@0: * added `Mapping\TraversalStrategy` Chris@0: * deprecated `Mapping\ClassMetadata::accept()` Chris@0: * deprecated `Mapping\MemberMetadata::accept()` Chris@0: * removed array type hint of `Mapping\ClassMetadata::setGroupSequence()` Chris@0: * deprecated `MetadataFactoryInterface` Chris@0: * deprecated `Mapping\BlackholeMetadataFactory` Chris@0: * deprecated `Mapping\ClassMetadataFactory` Chris@0: * added `Mapping\Factory\MetadataFactoryInterface` Chris@0: * added `Mapping\Factory\BlackHoleMetadataFactory` Chris@0: * added `Mapping\Factory\LazyLoadingMetadataFactory` Chris@0: * deprecated `ExecutionContextInterface` Chris@0: * deprecated `ExecutionContext` Chris@0: * deprecated `GlobalExecutionContextInterface` Chris@0: * added `Context\ExecutionContextInterface` Chris@0: * added `Context\ExecutionContext` Chris@0: * added `Context\ExecutionContextFactoryInterface` Chris@0: * added `Context\ExecutionContextFactory` Chris@0: * deprecated `ValidatorInterface` Chris@0: * deprecated `Validator` Chris@0: * deprecated `ValidationVisitorInterface` Chris@0: * deprecated `ValidationVisitor` Chris@0: * added `Validator\ValidatorInterface` Chris@0: * added `Validator\RecursiveValidator` Chris@0: * added `Validator\ContextualValidatorInterface` Chris@0: * added `Validator\RecursiveContextualValidator` Chris@0: * added `Violation\ConstraintViolationBuilderInterface` Chris@0: * added `Violation\ConstraintViolationBuilder` Chris@0: * added `ConstraintViolation::getParameters()` Chris@0: * added `ConstraintViolation::getPlural()` Chris@0: * added `Constraints\Traverse` Chris@0: * deprecated `$deep` property in `Constraints\Valid` Chris@0: * added `ValidatorBuilderInterface::setApiVersion()` Chris@0: * added `Validation::API_VERSION_2_4` Chris@0: * added `Validation::API_VERSION_2_5` Chris@0: * added `Exception\OutOfBoundsException` Chris@0: * added `Exception\UnsupportedMetadataException` Chris@0: * made `Exception\ValidatorException` extend `Exception\RuntimeException` Chris@0: * added `Util\PropertyPath` Chris@0: * made the PropertyAccess component an optional dependency Chris@0: * deprecated `ValidatorBuilder::setPropertyAccessor()` Chris@0: * deprecated `validate` and `validateValue` on `Validator\Context\ExecutionContext` use `getValidator()` together with `inContext()` instead Chris@0: Chris@0: 2.4.0 Chris@0: ----- Chris@0: Chris@0: * added a constraint the uses the expression language Chris@0: * added `minRatio`, `maxRatio`, `allowSquare`, `allowLandscape`, and `allowPortrait` to Image validator Chris@0: Chris@0: 2.3.29 Chris@0: ------ Chris@0: Chris@0: * fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator) Chris@0: Chris@0: 2.3.0 Chris@0: ----- Chris@0: Chris@0: * added the ISBN, ISSN, and IBAN validators Chris@0: * copied the constraints `Optional` and `Required` to the Chris@0: `Symfony\Component\Validator\Constraints\` namespace and deprecated the original Chris@0: classes. Chris@0: * added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo) Chris@0: Chris@0: 2.2.0 Chris@0: ----- Chris@0: Chris@0: * added a CardScheme validator Chris@0: * added a Luhn validator Chris@0: * moved @api-tags from `Validator` to `ValidatorInterface` Chris@0: * moved @api-tags from `ConstraintViolation` to the new `ConstraintViolationInterface` Chris@0: * moved @api-tags from `ConstraintViolationList` to the new `ConstraintViolationListInterface` Chris@0: * moved @api-tags from `ExecutionContext` to the new `ExecutionContextInterface` Chris@0: * [BC BREAK] `ConstraintValidatorInterface::initialize` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext` Chris@0: * [BC BREAK] changed the visibility of the properties in `Validator` from protected to private Chris@0: * deprecated `ClassMetadataFactoryInterface` in favor of the new `MetadataFactoryInterface` Chris@0: * deprecated `ClassMetadataFactory::getClassMetadata` in favor of `getMetadataFor` Chris@0: * created `MetadataInterface`, `PropertyMetadataInterface`, `ClassBasedInterface` and `PropertyMetadataContainerInterface` Chris@0: * deprecated `GraphWalker` in favor of the new `ValidationVisitorInterface` Chris@0: * deprecated `ExecutionContext::addViolationAtPath` Chris@0: * deprecated `ExecutionContext::addViolationAtSubPath` in favor of `ExecutionContextInterface::addViolationAt` Chris@0: * deprecated `ExecutionContext::getCurrentClass` in favor of `ExecutionContextInterface::getClassName` Chris@0: * deprecated `ExecutionContext::getCurrentProperty` in favor of `ExecutionContextInterface::getPropertyName` Chris@0: * deprecated `ExecutionContext::getCurrentValue` in favor of `ExecutionContextInterface::getValue` Chris@0: * deprecated `ExecutionContext::getGraphWalker` in favor of `ExecutionContextInterface::validate` and `ExecutionContextInterface::validateValue` Chris@0: * improved `ValidatorInterface::validateValue` to accept arrays of constraints Chris@0: * changed `ValidatorInterface::getMetadataFactory` to return a `MetadataFactoryInterface` instead of a `ClassMetadataFactoryInterface` Chris@0: * removed `ClassMetadataFactoryInterface` type hint from `ValidatorBuilderInterface::setMetadataFactory`. Chris@0: As of Symfony 2.3, this method will be typed against `MetadataFactoryInterface` instead. Chris@0: * [BC BREAK] the switches `traverse` and `deep` in the `Valid` constraint and in `GraphWalker::walkReference` Chris@0: are ignored for arrays now. Arrays are always traversed recursively. Chris@0: * added dependency to Translation component Chris@0: * violation messages are now translated with a TranslatorInterface implementation Chris@0: * [BC BREAK] inserted argument `$message` in the constructor of `ConstraintViolation` Chris@0: * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ExecutionContext` Chris@0: * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `GraphWalker` Chris@0: * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `ValidationVisitor` Chris@0: * [BC BREAK] inserted arguments `$translator` and `$translationDomain` in the constructor of `Validator` Chris@0: * [BC BREAK] added `setTranslator()` and `setTranslationDomain()` to `ValidatorBuilderInterface` Chris@0: * improved the Validator to support pluralized messages by default Chris@0: * [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version Chris@0: * added ExceptionInterface, BadMethodCallException and InvalidArgumentException Chris@0: Chris@0: 2.1.0 Chris@0: ----- Chris@0: Chris@0: * added support for `ctype_*` assertions in `TypeValidator` Chris@0: * improved the ImageValidator with min width, max width, min height, and max height constraints Chris@0: * added support for MIME with wildcard in FileValidator Chris@0: * changed Collection validator to add "missing" and "extra" errors to Chris@0: individual fields Chris@0: * changed default value for `extraFieldsMessage` and `missingFieldsMessage` Chris@0: in Collection constraint Chris@0: * made ExecutionContext immutable Chris@0: * deprecated Constraint methods `setMessage`, `getMessageTemplate` and Chris@0: `getMessageParameters` Chris@0: * added support for dynamic group sequences with the GroupSequenceProvider pattern Chris@0: * [BC BREAK] ConstraintValidatorInterface method `isValid` has been renamed to Chris@0: `validate`, its return value was dropped. ConstraintValidator still contains Chris@0: `isValid` for BC Chris@0: * [BC BREAK] collections in fields annotated with `Valid` are not traversed Chris@0: recursively anymore by default. `Valid` contains a new property `deep` Chris@0: which enables the BC behavior. Chris@0: * added Count constraint Chris@0: * added Length constraint Chris@0: * added Range constraint Chris@0: * deprecated the Min and Max constraints Chris@0: * deprecated the MinLength and MaxLength constraints Chris@0: * added Validation and ValidatorBuilderInterface Chris@0: * deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory