NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist, #199 most downloaded on Packagist
Provides tools to validate values
Latest stable
v8.1.11
Last release 9 days ago
13 Nov 2026
Ships fairly regularly
a new release about every 2 weeks
Rarely documented
notes for 1 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
15 years old
807 releases · first in 2011
Drag across the ruler to compare, or tap a release to open it.
bug #67842 Add the deprecated IPv6 site-local range to the private subnets ( @nicolas-grekas )
Changelog (v8.2.0-BETA1...v8.2.0-BETA2)
Ip constraint with IpUtils::PRIVATE_SUBNETS (@nicolas-grekas)Your coding agent can read these notes before it upgrades. Set up the MCP server →
feature #66630 Add ConstantFunctionProvider and deprecate the unrestricted constant() and enum() ( @nicolas-grekas )
Changelog (v8.1.11...v8.2.0-BETA1)
command.invocation and migrate command examples (@nicolas-grekas)framework.test when the container is compiled (@nicolas-grekas)not_compromised_password when framework.test is enabled (@nicolas-grekas)DateTimeImmutable::createFromTimestamp() to build dates from timestamps (@nicolas-grekas)Unique constraint (@nicolas-grekas)ConstantFunctionProvider and deprecate the unrestricted constant() and enum() (@nicolas-grekas)Constraint objects invokable (@rela589n)IntlDateFormatter of ConstraintValidator::formatValue() (@nicolas-grekas)EntityExists constraint (@evgenij-vy)message option to the Callback constraint (@javiereguiluz)Changelog ( v8.1.10...v8.1.11 )
Changelog (v8.1.10...v8.1.11)
[SECURITY] Security release
minor #67540 Fix Arabic validation messages and six-form plurals ( @malekkadri )
Changelog (v8.1.9...v8.1.10)
[SECURITY] Security release
minor #66903 Fix Tagalog (tl) translations and typos (@jcparucha)
Changelog (https://github.com/symfony/validator/compare/v8.1.8...v8.1.9)
Week (@lyrixx)minor #66438 Review Dutch (nl) translations (@michelvelswijk)
Changelog (https://github.com/symfony/validator/compare/v8.1.7...v8.1.8)
Range PHPDoc to accept \DateTimeInterface min/max (@paulferrett)minor #65926 Review Romanian (ro) translations (@robertiulianstoica)
Changelog (https://github.com/symfony/validator/compare/v8.1.6...v8.1.7)
bug #65690 Bound the nesting level of parsed expressions (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v8.1.5...v8.1.6)
bug #65367 Fix PHP 8.6 deprecations (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v8.1.4...v8.1.5)
EntityExists and Ulid message translation units (@nicolas-grekas)minor #65165 Added missing Slovak translations (@dtokos)
Changelog (https://github.com/symfony/validator/compare/v8.1.2...v8.1.4)
minor #65000 Review Italian validator translations (@JJordan0C)
Changelog (https://github.com/symfony/validator/compare/v8.1.1...v8.1.2)
Traverse to be inherited (@MatTheCat)Validation::createCallable() (@rela589n)data #64692 Remove needs-review-translation state from Spanish cron e… (@salvador-castro)
Changelog (https://github.com/symfony/validator/compare/v8.1.0...v8.1.1)
Changelog (https://github.com/symfony/validator/compare/v8.1.0-RC1...v8.1.0) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v8.1.0-RC1...v8.1.0)
ValidatorBuilder::enablePropertyMetadataExistenceCheck() to make validateProperty() and validatePropertyValue() throw when the given property has no metadatafindByCodes() to ConstraintViolationListInterfaceXml constraint for validating XML contentConstraintValidatorTestCase::validate() to encapsulate the way to call the constraint validatorConstraintValidatorInterface::initialize() and ConstraintValidatorInterface::validate() in
favor of ConstraintValidatorInterface::validateInContext(). The ConstraintValidator abstract class
handles the context management when extending it. When writing tests with ConstraintValidatorTestCase,
use the new validate() method to abstract the way to use the constraint validator.feature #64312 Add framework.validation.property_metadata_existence_check config (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v8.1.0-BETA3...v8.1.0-RC1)
framework.validation.property_metadata_existence_check config (@nicolas-grekas)bug #64239 Various fixes and hardenings (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v8.1.0-BETA2...v8.1.0-BETA3)
feature #64156 Add findByCodes() to ConstraintViolationListInterface (@michaelthieulin)
Changelog (https://github.com/symfony/validator/compare/v8.1.0-BETA1...v8.1.0-BETA2)
feature #63945 Make constraint validators reentrant instead of being stateful (@stof)
Changelog (https://github.com/symfony/validator/compare/v8.0.10...v8.1.0-BETA1)
Xml constraint (@sfmok)minor #65000 Review Italian validator translations (@JJordan0C)
Changelog (https://github.com/symfony/validator/compare/v8.0.14...v8.0.15)
Traverse to be inherited (@MatTheCat)Validation::createCallable() (@rela589n)data #64692 Remove needs-review-translation state from Spanish cron e… (@salvador-castro)
Changelog (https://github.com/symfony/validator/compare/v8.0.10...v8.0.14)
bug #63744 Fix Compound constraint with nested Composite and validation groups (@Amoifr)
Changelog (https://github.com/symfony/validator/compare/v8.0.9...v8.0.10)
bug #64036 fix mapping properties using property hooks (@mrossard)
Changelog (https://github.com/symfony/validator/compare/v8.0.7...v8.0.9)
Changelog (https://github.com/symfony/validator/compare/v8.0.7...v8.0.8) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v8.0.7...v8.0.8)
bug #63599 Fix required options check when extending a constraint with a simplified constructor (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v8.0.6...v8.0.7)
bug #63349 Fix AbstractComparison deprecation triggered for array values (@lacatoire)
Changelog (https://github.com/symfony/validator/compare/v8.0.5...v8.0.6)
allowedVariables in ExpressionSyntaxValidator (@alexandre-daubois)Unique::fields is set (@aprat84)Changelog (https://github.com/symfony/validator/compare/v8.0.4...v8.0.5) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v8.0.4...v8.0.5)
Changelog (https://github.com/symfony/validator/compare/v8.0.3...v8.0.4) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v8.0.3...v8.0.4)
bug symfony/symfony#62745 [Validator] do not use PHPUnit mock objects without configured expectations (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v8.0.2...v8.0.3)
Existence constraint (@xabbuh)bug symfony/symfony#62682 [Serializer][Validator] Attribute metadata no longer requires container.excluded tags (@HypeMC)
Changelog (https://github.com/symfony/validator/compare/v8.0.1...v8.0.2)
container.excluded tags (@HypeMC)Changelog (https://github.com/symfony/validator/compare/v8.0.0...v8.0.1) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v8.0.0...v8.0.1)
Remove support for configuring constraint options implicitly with the XML format
Remove support for configuring constraint options implicitly with the XML format
Before:
<class name="Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity">
<constraint name="Callback">
<value>Symfony\Component\Validator\Tests\Fixtures\CallbackClass</value>
<value>callback</value>
</constraint>
</class>
After:
<class name="Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity">
<constraint name="Callback">
<option name="callback">
<value>Symfony\Component\Validator\Tests\Fixtures\CallbackClass</value>
<value>callback</value>
</option>
</constraint>
</class>
Remove support for configuring constraint options implicitly with the YAML format
Before:
Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity:
constraints:
- Callback: validateMeStatic
- Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback]
After:
Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity:
constraints:
- Callback:
callback: validateMeStatic
- Callback:
callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback]
Remove support for passing associative arrays to GroupSequence
Before:
$groupSequence = GroupSequence(['value' => ['group 1', 'group 2']]);
After:
$groupSequence = GroupSequence(['group 1', 'group 2']);
Change the default value of the $requireTld option of the Url constraint to true
Add method getGroupProvider() to ClassMetadataInterface
Replace __sleep/wakeup() by __(un)serialize() on GenericMetadata implementations
Remove the getRequiredOptions() and getDefaultOption() methods from the All, AtLeastOneOf, CardScheme, Collection,
CssColor, Expression, Regex, Sequentially, Type, and When constraints
Remove support for evaluating options in the base Constraint class. Initialize properties in the constructor of the concrete constraint
class instead.
Before:
class CustomConstraint extends Constraint
{
public $option1;
public $option2;
public function __construct(?array $options = null)
{
parent::__construct($options);
}
}
After:
class CustomConstraint extends Constraint
{
public function __construct(
public $option1 = null,
public $option2 = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(null, $groups, $payload);
}
}
Remove the getRequiredOptions() method from the base Constraint class. Use mandatory constructor arguments instead.
Before:
class CustomConstraint extends Constraint
{
public $option1;
public $option2;
public function __construct(?array $options = null)
{
parent::__construct($options);
}
public function getRequiredOptions()
{
return ['option1'];
}
}
After:
class CustomConstraint extends Constraint
{
public function __construct(
public $option1,
public $option2 = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(null, $groups, $payload);
}
}
Remove the normalizeOptions() and getDefaultOption() methods of the base Constraint class without replacements.
Overriding them in child constraint does not have any effects.
Remove support for passing an array of options to the Composite constraint class. Initialize the properties referenced with getNestedConstraints()
in child classes before calling the constructor of Composite.
Before:
class CustomCompositeConstraint extends Composite
{
public array $constraints = [];
public function __construct(?array $options = null)
{
parent::__construct($options);
}
protected function getCompositeOption(): string
{
return 'constraints';
}
}
After:
class CustomCompositeConstraint extends Composite
{
public function __construct(
public array $constraints,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(null, $groups, $payload);
}
}
Remove Bic::INVALID_BANK_CODE_ERROR constant. This error code was not used in the Bic constraint validator anymore
Changelog (https://github.com/symfony/validator/compare/v8.0.0-RC2...v8.0.0-RC3) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v8.0.0-RC2...v8.0.0-RC3)
Nothing published for this version
bug symfony/symfony#62197 [Validator] Fix call to undefined getParser() in YamlValidator (@yoeunes)
Changelog (https://github.com/symfony/validator/compare/v8.0.0-BETA1...v8.0.0-BETA2)
feature symfony/symfony#61841 [Validator] deprecate passing an associative array to GroupSequence (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.3.4...v8.0.0-BETA1)
ANY protocol in Assert\Url constraint (@alekLexis)#[ExtendsValidationFor] to declare new constraints for a class (@nicolas-grekas)Video constraint for validating video files (@symfonyaml)__sleep/wakeup() by __(un)serialize() (@nicolas-grekas)__sleep/wakeup() on AbstractPart implementations (@nicolas-grekas)__sleep/wakeup() on GenericMetadata implementations (@nicolas-grekas)$options argument to Choice constraint (@xabbuh)min and max in both error messages of LengthValidator (@VincentLanglet)Type (@mtarld)Changelog ( v7.4.22...v7.4.23 )
Changelog (v7.4.22...v7.4.23)
[SECURITY] Security release
Changelog ( v7.4.21...v7.4.22 )
Changelog (v7.4.21...v7.4.22)
[SECURITY] Security release
minor #66903 Fix Tagalog (tl) translations and typos (@jcparucha)
Changelog (https://github.com/symfony/validator/compare/v7.4.20...v7.4.21)
Week (@lyrixx)minor #66438 Review Dutch (nl) translations (@michelvelswijk)
Changelog (https://github.com/symfony/validator/compare/v7.4.19...v7.4.20)
Range PHPDoc to accept \DateTimeInterface min/max (@paulferrett)minor #65926 Review Romanian (ro) translations (@robertiulianstoica)
Changelog (https://github.com/symfony/validator/compare/v7.4.18...v7.4.19)
bug #65690 Bound the nesting level of parsed expressions (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v7.4.17...v7.4.18)
bug #65367 Fix PHP 8.6 deprecations (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v7.4.16...v7.4.17)
EntityExists and Ulid message translation units (@nicolas-grekas)minor #65165 Added missing Slovak translations (@dtokos)
Changelog (https://github.com/symfony/validator/compare/v7.4.15...v7.4.16)
minor #65000 Review Italian validator translations (@JJordan0C)
Changelog (https://github.com/symfony/validator/compare/v7.4.14...v7.4.15)
Traverse to be inherited (@MatTheCat)Validation::createCallable() (@rela589n)data #64692 Remove needs-review-translation state from Spanish cron e… (@salvador-castro)
Changelog (https://github.com/symfony/validator/compare/v7.4.10...v7.4.14)
bug #63744 Fix Compound constraint with nested Composite and validation groups (@Amoifr)
Changelog (https://github.com/symfony/validator/compare/v7.4.9...v7.4.10)
bug #64036 fix mapping properties using property hooks (@mrossard)
Changelog (https://github.com/symfony/validator/compare/v7.4.7...v7.4.9)
Changelog (https://github.com/symfony/validator/compare/v7.4.7...v7.4.8) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.7...v7.4.8)
bug #63599 Fix required options check when extending a constraint with a simplified constructor (@nicolas-grekas)
Changelog (https://github.com/symfony/validator/compare/v7.4.6...v7.4.7)
bug #63349 Fix AbstractComparison deprecation triggered for array values (@lacatoire)
Changelog (https://github.com/symfony/validator/compare/v7.4.5...v7.4.6)
allowedVariables in ExpressionSyntaxValidator (@alexandre-daubois)Unique::fields is set (@aprat84)Changelog (https://github.com/symfony/validator/compare/v7.4.4...v7.4.5) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.4...v7.4.5)
Changelog (https://github.com/symfony/validator/compare/v7.4.3...v7.4.4) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.3...v7.4.4)
bug symfony/symfony#62745 [Validator] do not use PHPUnit mock objects without configured expectations (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.4.2...v7.4.3)
Existence constraint (@xabbuh)bug symfony/symfony#62682 [Serializer][Validator] Attribute metadata no longer requires container.excluded tags (@HypeMC)
Changelog (https://github.com/symfony/validator/compare/v7.4.1...v7.4.2)
container.excluded tags (@HypeMC)Changelog (https://github.com/symfony/validator/compare/v7.4.0...v7.4.1) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.0...v7.4.1)
Changelog (https://github.com/symfony/validator/compare/v7.4.0-RC3...v7.4.0) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.0-RC3...v7.4.0)
Deprecate handling associative arrays in GroupSequence
Before:
$groupSequence = GroupSequence(['value' => ['group 1', 'group 2']]);
After:
$groupSequence = GroupSequence(['group 1', 'group 2']);
Deprecate configuring constraint options implicitly with the XML format
Before:
<class name="Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity">
<constraint name="Callback">
<value>Symfony\Component\Validator\Tests\Fixtures\CallbackClass</value>
<value>callback</value>
</constraint>
</class>
After:
<class name="Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity">
<constraint name="Callback">
<option name="callback">
<value>Symfony\Component\Validator\Tests\Fixtures\CallbackClass</value>
<value>callback</value>
</option>
</constraint>
</class>
Deprecate configuring constraint options implicitly with the YAML format
Before:
Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity:
constraints:
- Callback: validateMeStatic
- Callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback]
After:
Symfony\Component\Validator\Tests\Fixtures\NestedAttribute\Entity:
constraints:
- Callback:
callback: validateMeStatic
- Callback:
callback: [Symfony\Component\Validator\Tests\Fixtures\CallbackClass, callback]
Add #[ExtendsValidationFor] to declare new constraints for a class
Add ValidatorBuilder::addAttributeMappings() and AttributeMetadataPass to declare compile-time constraint metadata using attributes
Add the Video constraint for validating video files
Deprecate implementing __sleep/wakeup() on GenericMetadata implementations; use __(un)serialize() instead
Deprecate passing a list of choices to the first argument of the Choice constraint. Use the choices option instead
Add the min and max parameter to the Length constraint violation
Deprecate getRequiredOptions() and getDefaultOption() methods of the All, AtLeastOneOf, CardScheme, Collection,
CssColor, Expression, Regex, Sequentially, Type, and When constraints
Deprecate evaluating options in the base Constraint class. Initialize properties in the constructor of the concrete constraint
class instead.
Before:
class CustomConstraint extends Constraint
{
public $option1;
public $option2;
public function __construct(?array $options = null)
{
parent::__construct($options);
}
}
After:
use Symfony\Component\Validator\Attribute\HasNamedArguments;
class CustomConstraint extends Constraint
{
#[HasNamedArguments]
public function __construct(
public $option1 = null,
public $option2 = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(null, $groups, $payload);
}
}
Deprecate the getRequiredOptions() method of the base Constraint class. Use mandatory constructor arguments instead.
Before:
class CustomConstraint extends Constraint
{
public $option1;
public $option2;
public function __construct(?array $options = null)
{
parent::__construct($options);
}
public function getRequiredOptions()
{
return ['option1'];
}
}
After:
use Symfony\Component\Validator\Attribute\HasNamedArguments;
class CustomConstraint extends Constraint
{
#[HasNamedArguments]
public function __construct(
public $option1,
public $option2 = null,
?array $groups = null,
mixed $payload = null,
) {
parent::__construct(null, $groups, $payload);
}
}
Deprecate the normalizeOptions() and getDefaultOption() methods of the base Constraint class without replacements.
Overriding them in child constraint will not have any effects starting with Symfony 8.0.
Deprecate passing an array of options to the Composite constraint class. Initialize the properties referenced with getNestedConstraints()
in child classes before calling the constructor of Composite.
Before:
class CustomCompositeConstraint extends Composite
{
public array $constraints = [];
public function __construct(?array $options = null)
{
parent::__construct($options);
}
protected function getCompositeOption(): string
{
return 'constraints';
}
}
After:
use Symfony\Component\Validator\Attribute\HasNamedArguments;
class CustomCompositeConstraint extends Composite
{
#[HasNamedArguments]
public function __construct(
public array $constraints,
?array $groups = null,
mixed $payload = null)
{
parent::__construct(null, $groups, $payload);
}
}
Changelog (https://github.com/symfony/validator/compare/v7.4.0-RC2...v7.4.0-RC3) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.0-RC2...v7.4.0-RC3)
Changelog (https://github.com/symfony/validator/compare/v7.4.0-BETA2...v7.4.0-RC1) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.4.0-BETA2...v7.4.0-RC1)
bug symfony/symfony#62197 [Validator] Fix call to undefined getParser() in YamlValidator (@yoeunes)
Changelog (https://github.com/symfony/validator/compare/v7.4.0-BETA1...v7.4.0-BETA2)
feature symfony/symfony#61841 [Validator] deprecate passing an associative array to GroupSequence (@xabbuh)
Changelog (https://github.com/symfony/validator/compare/v7.3.4...v7.4.0-BETA1)
ANY protocol in Assert\Url constraint (@alekLexis)#[ExtendsValidationFor] to declare new constraints for a class (@nicolas-grekas)Video constraint for validating video files (@symfonyaml)__sleep/wakeup() on AbstractPart implementations (@nicolas-grekas)__sleep/wakeup() on GenericMetadata implementations (@nicolas-grekas)$options argument to Choice constraint (@xabbuh)min and max in both error messages of LengthValidator (@VincentLanglet)Changelog (https://github.com/symfony/validator/compare/v7.3.10...v7.3.11) * no significant changes
Changelog (https://github.com/symfony/validator/compare/v7.3.10...v7.3.11)
One column per quarter.