Skip to content

Upgrading symfony/validator 6 to 7

Breakingv6.4.49 → v7.4.22Breaking3Security2Platform1Deprecated12New43Changed7Fixed95Other92

Fetching 79 releases from GitHub…78 / 79
BreakingUpgrade verdict

3 breaking changes and a platform requirement change and 2 security fixes.

  • Removes Doctrine annotations support.
  • Removes deprecated code paths.
  • Removes BC layers related to new methods and new parameters.
  • This version requires PHP 8.2 or newer.
Top 5 of 18 that need code or config changes

PHP requirement changed in v7.0.0-BETA1: >=8.1 → >=8.2.

Breaking3
Removes Doctrine annotations support.
Removes deprecated code paths.
Removes BC layers related to new methods and new parameters.
Security2
Prevents ffprobe option injection from video filenames.
ffprobe
Symfony has an incorrect response from Validator when input ends with \n
Low · CVSS 3.1
Platform1
Bumps the minimum PHP version to 8.2.
Deprecated12
Deprecates passing an associative array to GroupSequence.
GroupSequence
Deprecates implicit constraint option names in YAML/XML mapping files.
Deprecates implementing __sleep/wakeup() on AbstractPart implementations.
AbstractPart__sleep__wakeup
Deprecates implementing __sleep/wakeup() on GenericMetadata implementations.
GenericMetadata__sleep__wakeup
Deprecates passing choices as the $options argument to the Choice constraint.
Choice$options
Marks getRequiredOptions() and getDefaultOption() of UniqueEntity as deprecated.
UniqueEntitygetRequiredOptions()getDefaultOption()
Deprecates handling options in the base Constraint class.
Constraint
Deprecates the use of option arrays to configure validation constraints.
Deprecates the Bic::INVALID_BANK_CODE_ERROR constant.
Bic::INVALID_BANK_CODE_ERROR
Deprecates PropertyInfo Type.
PropertyInfo Type
Deprecates annotation occurrences.
Deprecates annotations in favor of attributes.