Upgrading symfony/validator 2 to 3
Unknownv2.8.52 → v3.4.47
Fetching 117 releases from GitHub…0 / 117
UnknownUpgrade verdict
DepDelta is still reading the notes for this range, so breaking changes can't be ruled out yet.
In plain terms
- DepDelta is still reading the release notes in this range, so it can't rule out breaking changes yet.
- This page updates as the notes come in.
Must act Still reading release notes
DepDelta is still reading the release notes in this range. This updates as they come in.
PHP requirement changed in v3.3.7: >=5.3.9 → ^5.5.9|>=7.0.8.
API changes
Generated by DepDelta from published PHP source. Not mixed with prose notes.
- removed:
class DefaultTranslator implements TranslatorInterface - removed:
class ExecutionContext implements ExecutionContextInterface - removed:
class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionContextInterface - removed:
class Validator implements ValidatorInterface, Mapping\Factory\MetadataFactoryInterface - removed:
const Validation.API_VERSION_2_4 - removed:
const Validation.API_VERSION_2_5 - removed:
const Validation.API_VERSION_2_5_BC - removed:
constructor ExecutionContext(GlobalExecutionContextInterface $globalContext, TranslatorInterface $translator, $translationDomain = …, MetadataInterface $metadata = …, $value = …, $group = …, $propertyPath = …) - removed:
constructor ValidationVisitor($root, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = …, array $objectInitializers = …) - removed:
constructor Validator(MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = …, array $objectInitializers = …) - removed:
interface ClassBasedInterface - removed:
interface ExecutionContextInterface - removed:
interface GlobalExecutionContextInterface - removed:
interface MetadataFactoryInterface - removed:
interface MetadataInterface - removed:
interface PropertyMetadataContainerInterface - removed:
interface PropertyMetadataInterface extends MetadataInterface - removed:
interface ValidationVisitorInterface - removed:
interface ValidatorInterface - removed:
method ClassBasedInterface.getClassName() - removed:
method ConstraintViolation.getMessageParameters() - removed:
method ConstraintViolation.getMessagePluralization() - removed:
method ConstraintViolationInterface.getMessageParameters() - removed:
method ConstraintViolationInterface.getMessagePluralization() - removed:
method DefaultTranslator.getLocale() - removed:
method DefaultTranslator.setLocale($locale) - removed:
method DefaultTranslator.trans($id, array $parameters = …, $domain = …, $locale = …) - removed:
method DefaultTranslator.transChoice($id, $number, array $parameters = …, $domain = …, $locale = …) - removed:
method ExecutionContext.addViolation($message, array $params = …, $invalidValue = …, $plural = …, $code = …) - removed:
method ExecutionContext.addViolationAt($subPath, $message, array $parameters = …, $invalidValue = …, $plural = …, $code = …) - removed:
method ExecutionContext.getClassName() - removed:
method ExecutionContext.getGroup() - removed:
method ExecutionContext.getMetadata() - removed:
method ExecutionContext.getMetadataFactory() - removed:
method ExecutionContext.getMetadataFor($value) - removed:
method ExecutionContext.getPropertyName() - removed:
method ExecutionContext.getPropertyPath($subPath = …) - removed:
method ExecutionContext.getRoot() - removed:
method ExecutionContext.getValue() - removed:
method ExecutionContext.getViolations() - removed:
method ExecutionContext.validate($value, $subPath = …, $groups = …, $traverse = …, $deep = …) - removed:
method ExecutionContext.validateValue($value, $constraints, $subPath = …, $groups = …) - removed:
method ExecutionContextInterface.addViolation($message, array $params = …, $invalidValue = …, $plural = …, $code = …) - removed:
method ExecutionContextInterface.addViolationAt($subPath, $message, array $parameters = …, $invalidValue = …, $plural = …, $code = …) - removed:
method ExecutionContextInterface.getClassName() - removed:
method ExecutionContextInterface.getGroup() - removed:
method ExecutionContextInterface.getMetadata() - removed:
method ExecutionContextInterface.getMetadataFactory() - removed:
method ExecutionContextInterface.getPropertyName() - removed:
method ExecutionContextInterface.getPropertyPath($subPath = …) - removed:
method ExecutionContextInterface.getRoot() - removed:
method ExecutionContextInterface.getValue() - removed:
method ExecutionContextInterface.getViolations() - removed:
method ExecutionContextInterface.validate($value, $subPath = …, $groups = …, $traverse = …, $deep = …) - removed:
method ExecutionContextInterface.validateValue($value, $constraints, $subPath = …, $groups = …) - removed:
method GlobalExecutionContextInterface.getMetadataFactory() - removed:
method GlobalExecutionContextInterface.getRoot() - removed:
method GlobalExecutionContextInterface.getValidatorFactory() - removed:
method GlobalExecutionContextInterface.getViolations() - removed:
method GlobalExecutionContextInterface.getVisitor() - removed:
method MetadataFactoryInterface.getMetadataFor($value) - removed:
method MetadataFactoryInterface.hasMetadataFor($value) - removed:
method MetadataInterface.accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) - removed:
method MetadataInterface.findConstraints($group) - removed:
method PropertyMetadataContainerInterface.getPropertyMetadata($property) - removed:
method PropertyMetadataContainerInterface.hasPropertyMetadata($property) - removed:
method PropertyMetadataInterface.getPropertyName() - removed:
method PropertyMetadataInterface.getPropertyValue($containingValue) - removed:
method ValidationVisitor.getMetadataFactory() - removed:
method ValidationVisitor.getRoot() - removed:
method ValidationVisitor.getValidatorFactory() - removed:
method ValidationVisitor.getViolations() - removed:
method ValidationVisitor.getVisitor() - removed:
method ValidationVisitor.validate($value, $group, $propertyPath, $traverse = …, $deep = …) - removed:
method ValidationVisitor.visit(MetadataInterface $metadata, $value, $group, $propertyPath) - removed:
method ValidationVisitorInterface.validate($value, $group, $propertyPath, $traverse = …, $deep = …) - removed:
method ValidationVisitorInterface.visit(MetadataInterface $metadata, $value, $group, $propertyPath) - removed:
method Validator.getMetadataFactory() - removed:
method Validator.getMetadataFor($value) - removed:
method Validator.hasMetadataFor($value) - removed:
method Validator.validate($value, $groups = …, $traverse = …, $deep = …) - removed:
method Validator.validateProperty($containingValue, $property, $groups = …) - removed:
method Validator.validatePropertyValue($containingValue, $property, $value, $groups = …) - removed:
method Validator.validateValue($value, $constraints, $groups = …) - removed:
method ValidatorBuilder.setApiVersion($apiVersion) - removed:
method ValidatorBuilder.setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) - removed:
method ValidatorBuilderInterface.setApiVersion($apiVersion) - removed:
method ValidatorBuilderInterface.setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) - removed:
method ValidatorInterface.getMetadataFactory() - removed:
method ValidatorInterface.validate($value, $groups = …, $traverse = …, $deep = …) - removed:
method ValidatorInterface.validateProperty($containingValue, $property, $groups = …) - removed:
method ValidatorInterface.validatePropertyValue($containingValue, $property, $value, $groups = …) - removed:
method ValidatorInterface.validateValue($value, $constraints, $groups = …) - removed:
protected method ConstraintValidator.buildViolation($message, array $parameters = …) - removed:
protected method ConstraintValidator.buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = …) - changed:
constructor ConstraintValidatorFactory($propertyAccessor = …) → constructor ConstraintValidatorFactory() - changed:
method ConstraintViolationListInterface.addAll(ConstraintViolationListInterface $otherList) → method ConstraintViolationListInterface.addAll(self $otherList) - added:
class ContainerConstraintValidatorFactory implements ConstraintValidatorFactoryInterface - added:
constructor ContainerConstraintValidatorFactory(ContainerInterface $container) - added:
method ConstraintViolationInterface.getParameters() - added:
method ConstraintViolationInterface.getPlural() - added:
method ConstraintViolationList.findByCodes($codes) - added:
method ContainerConstraintValidatorFactory.getInstance(Constraint $constraint) - added:
method ValidatorBuilder.getLoaders()
- removed:
class False extends IsFalse - removed:
class FalseValidator extends IsFalseValidator - removed:
class Null extends IsNull - removed:
class NullValidator extends IsNullValidator - removed:
class True extends IsTrue - removed:
class TrueValidator extends IsTrueValidator - removed:
const Iban.INVALID_CASE_ERROR - removed:
const Iban.TOO_SHORT_ERROR - removed:
const Range.BELOW_RANGE_ERROR - removed:
const Range.BEYOND_RANGE_ERROR - removed:
const Range.INVALID_VALUE_ERROR - removed:
const UuidValidator.LOOSE_PATTERN - removed:
const UuidValidator.STRICT_PATTERN - removed:
const UuidValidator.STRICT_UUID_LENGTH - removed:
constructor Valid($options = …) - removed:
method GroupSequence.count() - removed:
method GroupSequence.getIterator() - removed:
method GroupSequence.offsetExists($offset) - removed:
method GroupSequence.offsetGet($offset) - removed:
method GroupSequence.offsetSet($offset, $value) - removed:
method GroupSequence.offsetUnset($offset) - removed:
property Callback.methods - removed:
property Isbn.isbn10 - removed:
property Isbn.isbn13 - removed:
property Valid.deep - changed:
class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable → class GroupSequence - changed:
constructor ExpressionValidator(PropertyAccessorInterface $propertyAccessor = …, ExpressionLanguage $expressionLanguage = …) → constructor ExpressionValidator($propertyAccessor = …, ExpressionLanguage $expressionLanguage = …) - added:
class ValidValidator extends ConstraintValidator - added:
const Image.CORRUPTED_IMAGE_ERROR - added:
const Image.TOO_FEW_PIXEL_ERROR - added:
const Image.TOO_MANY_PIXEL_ERROR - added:
const Url.CHECK_DNS_TYPE_A - added:
const Url.CHECK_DNS_TYPE_A6 - added:
const Url.CHECK_DNS_TYPE_AAAA - added:
const Url.CHECK_DNS_TYPE_ANY - added:
const Url.CHECK_DNS_TYPE_CNAME - added:
const Url.CHECK_DNS_TYPE_MX - added:
const Url.CHECK_DNS_TYPE_NAPTR - added:
const Url.CHECK_DNS_TYPE_NONE - added:
const Url.CHECK_DNS_TYPE_NS - added:
const Url.CHECK_DNS_TYPE_PTR - added:
const Url.CHECK_DNS_TYPE_SOA - added:
const Url.CHECK_DNS_TYPE_SRV - added:
const Url.CHECK_DNS_TYPE_TXT - added:
constructor AbstractComparisonValidator(PropertyAccessorInterface $propertyAccessor = …) - added:
method Composite.getNestedContraints() - added:
method Valid.__get($option) - added:
method Valid.addImplicitGroupName($group) - added:
method ValidValidator.validate($value, Constraint $constraint) - added:
property AbstractComparison.propertyPath - added:
property DateTime.format - added:
property Image.corruptedMessage - added:
property Image.detectCorrupted - added:
property Image.maxPixels - added:
property Image.maxPixelsMessage - added:
property Image.minPixels - added:
property Image.minPixelsMessage
- removed:
class Optional extends BaseOptional - removed:
class Required extends BaseRequired
- removed:
class LegacyExecutionContext extends ExecutionContext - removed:
class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface - removed:
constructor LegacyExecutionContext(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = …) - removed:
constructor LegacyExecutionContextFactory(MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = …) - removed:
method ExecutionContext.addViolationAt($subPath, $message, array $parameters = …, $invalidValue = …, $plural = …, $code = …) - removed:
method ExecutionContext.getMetadataFactory() - removed:
method ExecutionContext.validate($value, $subPath = …, $groups = …, $traverse = …, $deep = …) - removed:
method ExecutionContext.validateValue($value, $constraints, $subPath = …, $groups = …) - removed:
method LegacyExecutionContextFactory.createContext(ValidatorInterface $validator, $root) - changed:
interface ExecutionContextInterface extends LegacyExecutionContextInterface → interface ExecutionContextInterface - changed:
method ExecutionContext.addViolation($message, array $parameters = …, $invalidValue = …, $plural = …, $code = …) → method ExecutionContext.addViolation($message, array $parameters = …) - added:
method ExecutionContextInterface.addViolation($message, array $params = …) - added:
method ExecutionContextInterface.getClassName() - added:
method ExecutionContextInterface.getGroup() - added:
method ExecutionContextInterface.getMetadata() - added:
method ExecutionContextInterface.getPropertyName() - added:
method ExecutionContextInterface.getPropertyPath($subPath = …) - added:
method ExecutionContextInterface.getRoot() - added:
method ExecutionContextInterface.getValue() - added:
method ExecutionContextInterface.getViolations()
- added:
class ValidatorDataCollector extends DataCollector implements LateDataCollectorInterface - added:
constructor ValidatorDataCollector(TraceableValidator $validator) - added:
method ValidatorDataCollector.collect(Request $request, Response $response, \Exception $exception = …) - added:
method ValidatorDataCollector.getCalls() - added:
method ValidatorDataCollector.getName() - added:
method ValidatorDataCollector.getViolationsCount() - added:
method ValidatorDataCollector.lateCollect() - added:
method ValidatorDataCollector.reset() - added:
protected method ValidatorDataCollector.getCasters()
- added:
class AddConstraintValidatorsPass implements CompilerPassInterface - added:
class AddValidatorInitializersPass implements CompilerPassInterface - added:
constructor AddConstraintValidatorsPass($validatorFactoryServiceId = …, $constraintValidatorTag = …) - added:
constructor AddValidatorInitializersPass($builderService = …, $initializerTag = …) - added:
method AddConstraintValidatorsPass.process(ContainerBuilder $container) - added:
method AddValidatorInitializersPass.process(ContainerBuilder $container)
- removed:
abstract class ElementMetadata extends GenericMetadata - removed:
class BlackholeMetadataFactory extends MappingBlackHoleMetadataFactory - removed:
class ClassMetadataFactory extends LazyLoadingMetadataFactory - removed:
const TraversalStrategy.STOP_RECURSION - removed:
constructor ElementMetadata() - removed:
method ClassMetadata.accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = …) - removed:
method ClassMetadata.getMemberMetadatas($property) - removed:
method ClassMetadata.hasMemberMetadatas($property) - removed:
method GenericMetadata.accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) - removed:
method MemberMetadata.accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = …) - removed:
method MemberMetadata.isCascaded() - removed:
method MemberMetadata.isCollectionCascaded() - removed:
method MemberMetadata.isCollectionCascadedDeeply() - removed:
protected method ClassMetadata.addMemberMetadata(MemberMetadata $metadata) - changed:
abstract class MemberMetadata extends ElementMetadata implements PropertyMetadataInterface → abstract class MemberMetadata extends GenericMetadata implements PropertyMetadataInterface - changed:
class ClassMetadata extends ElementMetadata implements ClassMetadataInterface → class ClassMetadata extends GenericMetadata implements ClassMetadataInterface - changed:
interface ClassMetadataInterface extends MetadataInterface, LegacyPropertyMetadataContainerInterface, ClassBasedInterface → interface ClassMetadataInterface extends MetadataInterface - changed:
interface MetadataInterface extends LegacyMetadataInterface → interface MetadataInterface - changed:
interface PropertyMetadataInterface extends MetadataInterface, LegacyPropertyMetadataInterface, ClassBasedInterface → interface PropertyMetadataInterface extends MetadataInterface - changed:
method ClassMetadata.mergeConstraints(ClassMetadata $source) → method ClassMetadata.mergeConstraints(self $source) - added:
method ClassMetadataInterface.getClassName() - added:
method ClassMetadataInterface.getPropertyMetadata($property) - added:
method ClassMetadataInterface.hasPropertyMetadata($property) - added:
method MetadataInterface.findConstraints($group) - added:
method PropertyMetadataInterface.getPropertyName() - added:
method PropertyMetadataInterface.getPropertyValue($containingValue)
- removed:
class ApcCache implements CacheInterface - removed:
constructor ApcCache($prefix) - removed:
method ApcCache.has($class) - removed:
method ApcCache.read($class) - removed:
method ApcCache.write(ClassMetadata $metadata) - added:
class Psr6Cache implements CacheInterface - added:
constructor Psr6Cache(CacheItemPoolInterface $cacheItemPool) - added:
method Psr6Cache.has($class) - added:
method Psr6Cache.read($class) - added:
method Psr6Cache.write(ClassMetadata $metadata)
- changed:
interface MetadataFactoryInterface extends LegacyMetadataFactoryInterface → interface MetadataFactoryInterface - added:
method MetadataFactoryInterface.getMetadataFor($value) - added:
method MetadataFactoryInterface.hasMetadataFor($value)
- added:
method LoaderChain.getLoaders() - added:
method XmlFileLoader.getMappedClasses() - added:
method YamlFileLoader.getMappedClasses()
- removed:
class LegacyValidator extends RecursiveValidator - removed:
method RecursiveValidator.getMetadataFactory() - removed:
method RecursiveValidator.validateValue($value, $constraints, $groups = …) - changed:
class RecursiveValidator implements ValidatorInterface, LegacyValidatorInterface → class RecursiveValidator implements ValidatorInterface - changed:
method RecursiveValidator.validate($value, $groups = …, $traverse = …, $deep = …) → method RecursiveValidator.validate($value, $constraints = …, $groups = …) - added:
class LazyProperty - added:
class TraceableValidator implements ValidatorInterface - added:
constructor LazyProperty(\Closure $propertyValueCallback) - added:
constructor TraceableValidator(ValidatorInterface $validator) - added:
method LazyProperty.getPropertyValue() - added:
method TraceableValidator.getCollectedData() - added:
method TraceableValidator.getMetadataFor($value) - added:
method TraceableValidator.hasMetadataFor($value) - added:
method TraceableValidator.inContext(ExecutionContextInterface $context) - added:
method TraceableValidator.reset() - added:
method TraceableValidator.startContext() - added:
method TraceableValidator.validate($value, $constraints = …, $groups = …) - added:
method TraceableValidator.validateProperty($object, $propertyName, $groups = …) - added:
method TraceableValidator.validatePropertyValue($objectOrClass, $propertyName, $value, $groups = …)
- removed:
class LegacyConstraintViolationBuilder implements ConstraintViolationBuilderInterface - removed:
constructor LegacyConstraintViolationBuilder(ExecutionContextInterface $context, $message, array $parameters) - removed:
method LegacyConstraintViolationBuilder.addViolation() - removed:
method LegacyConstraintViolationBuilder.atPath($path) - removed:
method LegacyConstraintViolationBuilder.setCause($cause) - removed:
method LegacyConstraintViolationBuilder.setCode($code) - removed:
method LegacyConstraintViolationBuilder.setInvalidValue($invalidValue) - removed:
method LegacyConstraintViolationBuilder.setParameter($key, $value) - removed:
method LegacyConstraintViolationBuilder.setParameters(array $parameters) - removed:
method LegacyConstraintViolationBuilder.setPlural($number) - removed:
method LegacyConstraintViolationBuilder.setTranslationDomain($translationDomain)