9 KiB
9 KiB
CHANGELOG
2.8.0
- added the BIC (SWIFT-Code) validator
2.7.0
- deprecated
DefaultTranslatorin favor ofSymfony\Component\Translation\IdentityTranslator - deprecated PHP7-incompatible constraints (Null, True, False) and related validators (NullValidator, TrueValidator, FalseValidator) in favor of their
Is-prefixed equivalent
2.6.0
- [BC BREAK]
FileValidatordisallow empty files - [BC BREAK]
UserPasswordValidatorsource message change - [BC BREAK] added internal
ExecutionContextInterface::setConstraint() - added
ConstraintViolation::getConstraint() - [BC BREAK] The
ExpressionValidatorwill now evaluate the Expression even when the property value is null or an empty string - deprecated
ClassMetadata::hasMemberMetadatas() - deprecated
ClassMetadata::getMemberMetadatas() - deprecated
ClassMetadata::addMemberMetadata() - [BC BREAK] added
Mapping\MetadataInterface::getConstraints() - added generic "payload" option to all constraints for attaching domain-specific data
- [BC BREAK] added
ConstraintViolationBuilderInterface::setCause()
2.5.0
- deprecated
ApcCachein favor ofDoctrineCache - added
DoctrineCacheto adapt any Doctrine cache GroupSequencenow implementsArrayAccess,CountableandTraversable- [BC BREAK] changed
ClassMetadata::getGroupSequence()to return aGroupSequenceinstance instead of an array Callbackcan now be put onto properties (useful when you pass a closure to the constraint)- deprecated
ClassBasedInterface - deprecated
MetadataInterface - deprecated
PropertyMetadataInterface - deprecated
PropertyMetadataContainerInterface - deprecated
Mapping\ElementMetadata - added
Mapping\MetadataInterface - added
Mapping\ClassMetadataInterface - added
Mapping\PropertyMetadataInterface - added
Mapping\GenericMetadata - added
Mapping\CascadingStrategy - added
Mapping\TraversalStrategy - deprecated
Mapping\ClassMetadata::accept() - deprecated
Mapping\MemberMetadata::accept() - removed array type hint of
Mapping\ClassMetadata::setGroupSequence() - deprecated
MetadataFactoryInterface - deprecated
Mapping\BlackholeMetadataFactory - deprecated
Mapping\ClassMetadataFactory - added
Mapping\Factory\MetadataFactoryInterface - added
Mapping\Factory\BlackHoleMetadataFactory - added
Mapping\Factory\LazyLoadingMetadataFactory - deprecated
ExecutionContextInterface - deprecated
ExecutionContext - deprecated
GlobalExecutionContextInterface - added
Context\ExecutionContextInterface - added
Context\ExecutionContext - added
Context\ExecutionContextFactoryInterface - added
Context\ExecutionContextFactory - deprecated
ValidatorInterface - deprecated
Validator - deprecated
ValidationVisitorInterface - deprecated
ValidationVisitor - added
Validator\ValidatorInterface - added
Validator\RecursiveValidator - added
Validator\ContextualValidatorInterface - added
Validator\RecursiveContextualValidator - added
Violation\ConstraintViolationBuilderInterface - added
Violation\ConstraintViolationBuilder - added
ConstraintViolation::getParameters() - added
ConstraintViolation::getPlural() - added
Constraints\Traverse - deprecated
$deepproperty inConstraints\Valid - added
ValidatorBuilderInterface::setApiVersion() - added
Validation::API_VERSION_2_4 - added
Validation::API_VERSION_2_5 - added
Exception\OutOfBoundsException - added
Exception\UnsupportedMetadataException - made
Exception\ValidatorExceptionextendException\RuntimeException - added
Util\PropertyPath - made the PropertyAccess component an optional dependency
- deprecated
ValidatorBuilder::setPropertyAccessor() - deprecated
validateandvalidateValueonValidator\Context\ExecutionContextusegetValidator()together withinContext()instead
2.4.0
- added a constraint the uses the expression language
- added
minRatio,maxRatio,allowSquare,allowLandscape, andallowPortraitto Image validator
2.3.29
- fixed compatibility with PHP7 and up by introducing new constraints (IsNull, IsTrue, IsFalse) and related validators (IsNullValidator, IsTrueValidator, IsFalseValidator)
2.3.0
- added the ISBN, ISSN, and IBAN validators
- copied the constraints
OptionalandRequiredto theSymfony\Component\Validator\Constraints\namespace and deprecated the original classes. - added comparison validators (EqualTo, NotEqualTo, LessThan, LessThanOrEqualTo, GreaterThan, GreaterThanOrEqualTo, IdenticalTo, NotIdenticalTo)
2.2.0
- added a CardScheme validator
- added a Luhn validator
- moved @api-tags from
ValidatortoValidatorInterface - moved @api-tags from
ConstraintViolationto the newConstraintViolationInterface - moved @api-tags from
ConstraintViolationListto the newConstraintViolationListInterface - moved @api-tags from
ExecutionContextto the newExecutionContextInterface - [BC BREAK]
ConstraintValidatorInterface::initializeis now type hinted againstExecutionContextInterfaceinstead ofExecutionContext - [BC BREAK] changed the visibility of the properties in
Validatorfrom protected to private - deprecated
ClassMetadataFactoryInterfacein favor of the newMetadataFactoryInterface - deprecated
ClassMetadataFactory::getClassMetadatain favor ofgetMetadataFor - created
MetadataInterface,PropertyMetadataInterface,ClassBasedInterfaceandPropertyMetadataContainerInterface - deprecated
GraphWalkerin favor of the newValidationVisitorInterface - deprecated
ExecutionContext::addViolationAtPath - deprecated
ExecutionContext::addViolationAtSubPathin favor ofExecutionContextInterface::addViolationAt - deprecated
ExecutionContext::getCurrentClassin favor ofExecutionContextInterface::getClassName - deprecated
ExecutionContext::getCurrentPropertyin favor ofExecutionContextInterface::getPropertyName - deprecated
ExecutionContext::getCurrentValuein favor ofExecutionContextInterface::getValue - deprecated
ExecutionContext::getGraphWalkerin favor ofExecutionContextInterface::validateandExecutionContextInterface::validateValue - improved
ValidatorInterface::validateValueto accept arrays of constraints - changed
ValidatorInterface::getMetadataFactoryto return aMetadataFactoryInterfaceinstead of aClassMetadataFactoryInterface - removed
ClassMetadataFactoryInterfacetype hint fromValidatorBuilderInterface::setMetadataFactory. As of Symfony 2.3, this method will be typed againstMetadataFactoryInterfaceinstead. - [BC BREAK] the switches
traverseanddeepin theValidconstraint and inGraphWalker::walkReferenceare ignored for arrays now. Arrays are always traversed recursively. - added dependency to Translation component
- violation messages are now translated with a TranslatorInterface implementation
- [BC BREAK] inserted argument
$messagein the constructor ofConstraintViolation - [BC BREAK] inserted arguments
$translatorand$translationDomainin the constructor ofExecutionContext - [BC BREAK] inserted arguments
$translatorand$translationDomainin the constructor ofGraphWalker - [BC BREAK] inserted arguments
$translatorand$translationDomainin the constructor ofValidationVisitor - [BC BREAK] inserted arguments
$translatorand$translationDomainin the constructor ofValidator - [BC BREAK] added
setTranslator()andsetTranslationDomain()toValidatorBuilderInterface - improved the Validator to support pluralized messages by default
- [BC BREAK] changed the source of all pluralized messages in the translation files to the pluralized version
- added ExceptionInterface, BadMethodCallException and InvalidArgumentException
2.1.0
- added support for
ctype_*assertions inTypeValidator - improved the ImageValidator with min width, max width, min height, and max height constraints
- added support for MIME with wildcard in FileValidator
- changed Collection validator to add "missing" and "extra" errors to individual fields
- changed default value for
extraFieldsMessageandmissingFieldsMessagein Collection constraint - made ExecutionContext immutable
- deprecated Constraint methods
setMessage,getMessageTemplateandgetMessageParameters - added support for dynamic group sequences with the GroupSequenceProvider pattern
- [BC BREAK] ConstraintValidatorInterface method
isValidhas been renamed tovalidate, its return value was dropped. ConstraintValidator still containsisValidfor BC - [BC BREAK] collections in fields annotated with
Validare not traversed recursively anymore by default.Validcontains a new propertydeepwhich enables the BC behavior. - added Count constraint
- added Length constraint
- added Range constraint
- deprecated the Min and Max constraints
- deprecated the MinLength and MaxLength constraints
- added Validation and ValidatorBuilderInterface
- deprecated ValidatorContext, ValidatorContextInterface and ValidatorFactory