diff --git a/UPGRADE-7.0.md b/UPGRADE-7.0.md index f1b2c7c687f7b..ae620a5a7ead4 100644 --- a/UPGRADE-7.0.md +++ b/UPGRADE-7.0.md @@ -316,6 +316,10 @@ Validator * Remove static property `$errorNames` from all constraints, use const `ERROR_NAMES` instead * Remove `VALIDATION_MODE_LOOSE` from `Email` constraint, use `VALIDATION_MODE_HTML5` instead * Remove constraint `ExpressionLanguageSyntax`, use `ExpressionSyntax` instead + * Remove Doctrine annotations support in favor of native attributes + * Remove the annotation reader parameter from the constructor signature of `AnnotationLoader` + * Remove `ValidatorBuilder::setDoctrineAnnotationReader()` + * Remove `ValidatorBuilder::addDefaultDoctrineAnnotationReader()` VarDumper --------- diff --git a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php index 14d7b39d162ed..db66051158257 100644 --- a/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php +++ b/src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php @@ -16,9 +16,6 @@ /** * Constraint for the Unique Entity validator. * - * @Annotation - * @Target({"CLASS", "ANNOTATION"}) - * * @author Benjamin Eberlei */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php index b1a340c86e520..e7b7cd26d49f7 100644 --- a/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php +++ b/src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php @@ -13,10 +13,6 @@ use Symfony\Component\Validator\Constraint; -/** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] class UserPassword extends Constraint { diff --git a/src/Symfony/Component/Validator/CHANGELOG.md b/src/Symfony/Component/Validator/CHANGELOG.md index b8c0777bd6068..4e6fe790002c8 100644 --- a/src/Symfony/Component/Validator/CHANGELOG.md +++ b/src/Symfony/Component/Validator/CHANGELOG.md @@ -10,6 +10,10 @@ CHANGELOG * Remove static property `$errorNames` from all constraints, use const `ERROR_NAMES` instead * Remove `VALIDATION_MODE_LOOSE` from `Email` constraint, use `VALIDATION_MODE_HTML5` instead * Remove constraint `ExpressionLanguageSyntax`, use `ExpressionSyntax` instead + * Remove Doctrine annotations support in favor of native attributes + * Remove the annotation reader parameter from the constructor signature of `AnnotationLoader` + * Remove `ValidatorBuilder::setDoctrineAnnotationReader()` + * Remove `ValidatorBuilder::addDefaultDoctrineAnnotationReader()` 6.4 --- diff --git a/src/Symfony/Component/Validator/Constraints/All.php b/src/Symfony/Component/Validator/Constraints/All.php index 1461b0348e8aa..63d2d5b96d61b 100644 --- a/src/Symfony/Component/Validator/Constraints/All.php +++ b/src/Symfony/Component/Validator/Constraints/All.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php b/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php index 48469d877ef7a..bfa33533de430 100644 --- a/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php +++ b/src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Przemysław Bogusz */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Bic.php b/src/Symfony/Component/Validator/Constraints/Bic.php index d976dd0a38d89..faeb63939bce1 100644 --- a/src/Symfony/Component/Validator/Constraints/Bic.php +++ b/src/Symfony/Component/Validator/Constraints/Bic.php @@ -18,9 +18,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Michael Hirschler */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Blank.php b/src/Symfony/Component/Validator/Constraints/Blank.php index a7e612a295899..f620815ed2ada 100644 --- a/src/Symfony/Component/Validator/Constraints/Blank.php +++ b/src/Symfony/Component/Validator/Constraints/Blank.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Callback.php b/src/Symfony/Component/Validator/Constraints/Callback.php index 82f67962b2572..2f0defe2cf426 100644 --- a/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/Symfony/Component/Validator/Constraints/Callback.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/CardScheme.php b/src/Symfony/Component/Validator/Constraints/CardScheme.php index 76dbcb9d86f2c..260bdd4ac1344 100644 --- a/src/Symfony/Component/Validator/Constraints/CardScheme.php +++ b/src/Symfony/Component/Validator/Constraints/CardScheme.php @@ -16,9 +16,6 @@ /** * Metadata for the CardSchemeValidator. * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Tim Nagel * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Cascade.php b/src/Symfony/Component/Validator/Constraints/Cascade.php index 42f8784ca3ad1..763e9ac74abeb 100644 --- a/src/Symfony/Component/Validator/Constraints/Cascade.php +++ b/src/Symfony/Component/Validator/Constraints/Cascade.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** - * @Annotation - * @Target({"CLASS"}) - * * @author Jules Pietri */ #[\Attribute(\Attribute::TARGET_CLASS)] diff --git a/src/Symfony/Component/Validator/Constraints/Choice.php b/src/Symfony/Component/Validator/Constraints/Choice.php index 83cb78b76dff7..4d9cda00496e9 100644 --- a/src/Symfony/Component/Validator/Constraints/Choice.php +++ b/src/Symfony/Component/Validator/Constraints/Choice.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Cidr.php b/src/Symfony/Component/Validator/Constraints/Cidr.php index 0a721a45ce644..84d48af733276 100644 --- a/src/Symfony/Component/Validator/Constraints/Cidr.php +++ b/src/Symfony/Component/Validator/Constraints/Cidr.php @@ -17,9 +17,6 @@ /** * Validates that a value is a valid CIDR notation. * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Sorin Pop * @author Calin Bolea */ diff --git a/src/Symfony/Component/Validator/Constraints/Collection.php b/src/Symfony/Component/Validator/Constraints/Collection.php index 6a6bcf3cc4a9c..635822ca48603 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection.php +++ b/src/Symfony/Component/Validator/Constraints/Collection.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Count.php b/src/Symfony/Component/Validator/Constraints/Count.php index 89985c398f2d0..92c9b240fb17b 100644 --- a/src/Symfony/Component/Validator/Constraints/Count.php +++ b/src/Symfony/Component/Validator/Constraints/Count.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Country.php b/src/Symfony/Component/Validator/Constraints/Country.php index 0ca6fa47da197..a4a63aa4807a2 100644 --- a/src/Symfony/Component/Validator/Constraints/Country.php +++ b/src/Symfony/Component/Validator/Constraints/Country.php @@ -16,9 +16,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/CssColor.php b/src/Symfony/Component/Validator/Constraints/CssColor.php index 56f4e1b16b440..177d867560fff 100644 --- a/src/Symfony/Component/Validator/Constraints/CssColor.php +++ b/src/Symfony/Component/Validator/Constraints/CssColor.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Mathieu Santostefano */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Currency.php b/src/Symfony/Component/Validator/Constraints/Currency.php index 5e4d81567cc6b..5defeac1c2639 100644 --- a/src/Symfony/Component/Validator/Constraints/Currency.php +++ b/src/Symfony/Component/Validator/Constraints/Currency.php @@ -16,9 +16,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Miha Vrhovnik * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Date.php b/src/Symfony/Component/Validator/Constraints/Date.php index e836df8fd0429..de402ade4917b 100644 --- a/src/Symfony/Component/Validator/Constraints/Date.php +++ b/src/Symfony/Component/Validator/Constraints/Date.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/DateTime.php b/src/Symfony/Component/Validator/Constraints/DateTime.php index d8f97c69624ae..62f772c79ef8a 100644 --- a/src/Symfony/Component/Validator/Constraints/DateTime.php +++ b/src/Symfony/Component/Validator/Constraints/DateTime.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php b/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php index 1c09123d03685..68646f5c00471 100644 --- a/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php +++ b/src/Symfony/Component/Validator/Constraints/DisableAutoMapping.php @@ -17,11 +17,9 @@ /** * Disables auto mapping. * - * Using the annotations on a property has higher precedence than using it on a class, + * Using the attribute on a property has higher precedence than using it on a class, * which has higher precedence than any configuration that might be defined outside the class. * - * @Annotation - * * @author Kévin Dunglas */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS)] diff --git a/src/Symfony/Component/Validator/Constraints/DivisibleBy.php b/src/Symfony/Component/Validator/Constraints/DivisibleBy.php index 941b7e07c0e43..84355d891ffdd 100644 --- a/src/Symfony/Component/Validator/Constraints/DivisibleBy.php +++ b/src/Symfony/Component/Validator/Constraints/DivisibleBy.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Colin O'Dell */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Email.php b/src/Symfony/Component/Validator/Constraints/Email.php index a505d56dc3fcf..6360aab6f5f91 100644 --- a/src/Symfony/Component/Validator/Constraints/Email.php +++ b/src/Symfony/Component/Validator/Constraints/Email.php @@ -17,9 +17,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php b/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php index 1adefda29584c..fbedddd5def34 100644 --- a/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php +++ b/src/Symfony/Component/Validator/Constraints/EnableAutoMapping.php @@ -17,11 +17,9 @@ /** * Enables auto mapping. * - * Using the annotations on a property has higher precedence than using it on a class, + * Using the attribute on a property has higher precedence than using it on a class, * which has higher precedence than any configuration that might be defined outside the class. * - * @Annotation - * * @author Kévin Dunglas */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::TARGET_CLASS)] diff --git a/src/Symfony/Component/Validator/Constraints/EqualTo.php b/src/Symfony/Component/Validator/Constraints/EqualTo.php index a6c4d1d107400..fedece0e043c0 100644 --- a/src/Symfony/Component/Validator/Constraints/EqualTo.php +++ b/src/Symfony/Component/Validator/Constraints/EqualTo.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Expression.php b/src/Symfony/Component/Validator/Constraints/Expression.php index 19218e7d86717..1f0f35b86315f 100644 --- a/src/Symfony/Component/Validator/Constraints/Expression.php +++ b/src/Symfony/Component/Validator/Constraints/Expression.php @@ -17,9 +17,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Fabien Potencier * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php b/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php index a614ae43fc6ff..e3940cf3851d6 100644 --- a/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php +++ b/src/Symfony/Component/Validator/Constraints/ExpressionSyntax.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Andrey Sevastianov */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/File.php b/src/Symfony/Component/Validator/Constraints/File.php index 0716abe1c499b..cb774269ac242 100644 --- a/src/Symfony/Component/Validator/Constraints/File.php +++ b/src/Symfony/Component/Validator/Constraints/File.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @property int $maxSize * * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/GreaterThan.php b/src/Symfony/Component/Validator/Constraints/GreaterThan.php index 160aa2a623ebf..d010b0de7a282 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThan.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThan.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php index b4bed95a1ac2a..faf1c48d04196 100644 --- a/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php +++ b/src/Symfony/Component/Validator/Constraints/GreaterThanOrEqual.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 57122b02edcb5..5c9a41b7b0123 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -44,10 +44,6 @@ * * $validator->validate($address, null, "Address") * - * @Annotation - * - * @Target({"CLASS", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_CLASS)] diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php b/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php index 9b125470fa47a..00bfc57130aaa 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequenceProvider.php @@ -14,10 +14,6 @@ /** * Attribute to define a group sequence provider. * - * @Annotation - * - * @Target({"CLASS", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_CLASS)] diff --git a/src/Symfony/Component/Validator/Constraints/Hostname.php b/src/Symfony/Component/Validator/Constraints/Hostname.php index c0463b33508f8..d24166de562ba 100644 --- a/src/Symfony/Component/Validator/Constraints/Hostname.php +++ b/src/Symfony/Component/Validator/Constraints/Hostname.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Dmitrii Poddubnyi */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Iban.php b/src/Symfony/Component/Validator/Constraints/Iban.php index 2fefd504cb499..00287f831eac7 100644 --- a/src/Symfony/Component/Validator/Constraints/Iban.php +++ b/src/Symfony/Component/Validator/Constraints/Iban.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Manuel Reinhard * @author Michael Schummel * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/IdenticalTo.php b/src/Symfony/Component/Validator/Constraints/IdenticalTo.php index 982617aa3d1a8..7ef73a0471c06 100644 --- a/src/Symfony/Component/Validator/Constraints/IdenticalTo.php +++ b/src/Symfony/Component/Validator/Constraints/IdenticalTo.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Image.php b/src/Symfony/Component/Validator/Constraints/Image.php index ed2d4fa60a4fd..7306dd7bde12c 100644 --- a/src/Symfony/Component/Validator/Constraints/Image.php +++ b/src/Symfony/Component/Validator/Constraints/Image.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Benjamin Dulau * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Ip.php b/src/Symfony/Component/Validator/Constraints/Ip.php index 050f31ef3b129..6ea33486a44ef 100644 --- a/src/Symfony/Component/Validator/Constraints/Ip.php +++ b/src/Symfony/Component/Validator/Constraints/Ip.php @@ -18,9 +18,6 @@ /** * Validates that a value is a valid IP address. * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek * @author Joseph Bielawski */ diff --git a/src/Symfony/Component/Validator/Constraints/IsFalse.php b/src/Symfony/Component/Validator/Constraints/IsFalse.php index 9e86383b741ef..f87180fb35577 100644 --- a/src/Symfony/Component/Validator/Constraints/IsFalse.php +++ b/src/Symfony/Component/Validator/Constraints/IsFalse.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/IsNull.php b/src/Symfony/Component/Validator/Constraints/IsNull.php index b6d9eaa1a12dc..018ad150707ee 100644 --- a/src/Symfony/Component/Validator/Constraints/IsNull.php +++ b/src/Symfony/Component/Validator/Constraints/IsNull.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/IsTrue.php b/src/Symfony/Component/Validator/Constraints/IsTrue.php index 0f3e2f1895d41..045da66e64b8a 100644 --- a/src/Symfony/Component/Validator/Constraints/IsTrue.php +++ b/src/Symfony/Component/Validator/Constraints/IsTrue.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Isbn.php b/src/Symfony/Component/Validator/Constraints/Isbn.php index 18a8e7758132a..b8373f5912873 100644 --- a/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author The Whole Life To Learn * @author Manuel Reinhard * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/Isin.php b/src/Symfony/Component/Validator/Constraints/Isin.php index 90a7131583004..b800dec86cdef 100644 --- a/src/Symfony/Component/Validator/Constraints/Isin.php +++ b/src/Symfony/Component/Validator/Constraints/Isin.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Laurent Masforné */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Issn.php b/src/Symfony/Component/Validator/Constraints/Issn.php index e591960e9819f..cafb242ec2d2e 100644 --- a/src/Symfony/Component/Validator/Constraints/Issn.php +++ b/src/Symfony/Component/Validator/Constraints/Issn.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Antonio J. García Lagar * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Json.php b/src/Symfony/Component/Validator/Constraints/Json.php index 6facc6dbab259..3ef40d94df7af 100644 --- a/src/Symfony/Component/Validator/Constraints/Json.php +++ b/src/Symfony/Component/Validator/Constraints/Json.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Imad ZAIRIG */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Language.php b/src/Symfony/Component/Validator/Constraints/Language.php index b0d18289e57ff..0ff135b2b85ef 100644 --- a/src/Symfony/Component/Validator/Constraints/Language.php +++ b/src/Symfony/Component/Validator/Constraints/Language.php @@ -16,9 +16,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Length.php b/src/Symfony/Component/Validator/Constraints/Length.php index 4daf59e50ac5c..9400c5ec27c4b 100644 --- a/src/Symfony/Component/Validator/Constraints/Length.php +++ b/src/Symfony/Component/Validator/Constraints/Length.php @@ -16,9 +16,6 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/LessThan.php b/src/Symfony/Component/Validator/Constraints/LessThan.php index 2770c9b159bc2..ef5dedc0e1a52 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThan.php +++ b/src/Symfony/Component/Validator/Constraints/LessThan.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php b/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php index e2f127f07ab05..0c2b5c851444b 100644 --- a/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php +++ b/src/Symfony/Component/Validator/Constraints/LessThanOrEqual.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Locale.php b/src/Symfony/Component/Validator/Constraints/Locale.php index 946785b43b917..43bd4127e4ecc 100644 --- a/src/Symfony/Component/Validator/Constraints/Locale.php +++ b/src/Symfony/Component/Validator/Constraints/Locale.php @@ -16,9 +16,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Luhn.php b/src/Symfony/Component/Validator/Constraints/Luhn.php index fb76ec9a04892..2fc5c8bc5bb66 100644 --- a/src/Symfony/Component/Validator/Constraints/Luhn.php +++ b/src/Symfony/Component/Validator/Constraints/Luhn.php @@ -16,9 +16,6 @@ /** * Metadata for the LuhnValidator. * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Tim Nagel * @author Greg Knapp http://gregk.me/2011/php-implementation-of-bank-card-luhn-algorithm/ * @author Bernhard Schussek diff --git a/src/Symfony/Component/Validator/Constraints/Negative.php b/src/Symfony/Component/Validator/Constraints/Negative.php index c13ebcb4a8b92..0a47120d3a844 100644 --- a/src/Symfony/Component/Validator/Constraints/Negative.php +++ b/src/Symfony/Component/Validator/Constraints/Negative.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Jan Schädlich */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/NegativeOrZero.php b/src/Symfony/Component/Validator/Constraints/NegativeOrZero.php index 5be735c312daf..8161f3b022d2c 100644 --- a/src/Symfony/Component/Validator/Constraints/NegativeOrZero.php +++ b/src/Symfony/Component/Validator/Constraints/NegativeOrZero.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Jan Schädlich */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharacters.php b/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharacters.php index 7548703f342a0..07cae710de164 100644 --- a/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharacters.php +++ b/src/Symfony/Component/Validator/Constraints/NoSuspiciousCharacters.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Mathieu Lechat */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/NotBlank.php b/src/Symfony/Component/Validator/Constraints/NotBlank.php index 02d6d5c79fcca..a9d7d6360778f 100644 --- a/src/Symfony/Component/Validator/Constraints/NotBlank.php +++ b/src/Symfony/Component/Validator/Constraints/NotBlank.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek * @author Kévin Dunglas */ diff --git a/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php b/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php index ae90925f78111..afd9571672f0a 100644 --- a/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php +++ b/src/Symfony/Component/Validator/Constraints/NotCompromisedPassword.php @@ -16,9 +16,6 @@ /** * Checks if a password has been leaked in a data breach. * - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Kévin Dunglas */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/NotEqualTo.php b/src/Symfony/Component/Validator/Constraints/NotEqualTo.php index 8ddc2d334b1ba..aad8beb1cf320 100644 --- a/src/Symfony/Component/Validator/Constraints/NotEqualTo.php +++ b/src/Symfony/Component/Validator/Constraints/NotEqualTo.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php b/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php index 80628135adf02..7107c8b1ef068 100644 --- a/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php +++ b/src/Symfony/Component/Validator/Constraints/NotIdenticalTo.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Daniel Holmes * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/NotNull.php b/src/Symfony/Component/Validator/Constraints/NotNull.php index 8d4f2e211871a..8b3ebc16c6792 100644 --- a/src/Symfony/Component/Validator/Constraints/NotNull.php +++ b/src/Symfony/Component/Validator/Constraints/NotNull.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Optional.php b/src/Symfony/Component/Validator/Constraints/Optional.php index dab8b4371f2c7..df331a676ca2e 100644 --- a/src/Symfony/Component/Validator/Constraints/Optional.php +++ b/src/Symfony/Component/Validator/Constraints/Optional.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"ANNOTATION"}) - * * @author Bernhard Schussek */ class Optional extends Existence diff --git a/src/Symfony/Component/Validator/Constraints/PasswordStrength.php b/src/Symfony/Component/Validator/Constraints/PasswordStrength.php index 816708d67ea91..cb5792800fbfc 100644 --- a/src/Symfony/Component/Validator/Constraints/PasswordStrength.php +++ b/src/Symfony/Component/Validator/Constraints/PasswordStrength.php @@ -15,10 +15,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** - * @Annotation - * - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Florent Morselli */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Positive.php b/src/Symfony/Component/Validator/Constraints/Positive.php index 951e944c9a7e4..5385dc50335f4 100644 --- a/src/Symfony/Component/Validator/Constraints/Positive.php +++ b/src/Symfony/Component/Validator/Constraints/Positive.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Jan Schädlich */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/PositiveOrZero.php b/src/Symfony/Component/Validator/Constraints/PositiveOrZero.php index a7669c61070d0..d73228193761f 100644 --- a/src/Symfony/Component/Validator/Constraints/PositiveOrZero.php +++ b/src/Symfony/Component/Validator/Constraints/PositiveOrZero.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Jan Schädlich */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Range.php b/src/Symfony/Component/Validator/Constraints/Range.php index da01a5488f2e6..97203957c94e1 100644 --- a/src/Symfony/Component/Validator/Constraints/Range.php +++ b/src/Symfony/Component/Validator/Constraints/Range.php @@ -18,9 +18,6 @@ use Symfony\Component\Validator\Exception\MissingOptionsException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Regex.php b/src/Symfony/Component/Validator/Constraints/Regex.php index 9062819e12f2f..ac740b80250f3 100644 --- a/src/Symfony/Component/Validator/Constraints/Regex.php +++ b/src/Symfony/Component/Validator/Constraints/Regex.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Required.php b/src/Symfony/Component/Validator/Constraints/Required.php index bd77a909f97fb..2a1a27f6a2071 100644 --- a/src/Symfony/Component/Validator/Constraints/Required.php +++ b/src/Symfony/Component/Validator/Constraints/Required.php @@ -12,9 +12,6 @@ namespace Symfony\Component\Validator\Constraints; /** - * @Annotation - * @Target({"ANNOTATION"}) - * * @author Bernhard Schussek */ class Required extends Existence diff --git a/src/Symfony/Component/Validator/Constraints/Sequentially.php b/src/Symfony/Component/Validator/Constraints/Sequentially.php index 5eea1ebba439d..0ee6fb1f17d99 100644 --- a/src/Symfony/Component/Validator/Constraints/Sequentially.php +++ b/src/Symfony/Component/Validator/Constraints/Sequentially.php @@ -15,9 +15,6 @@ * Use this constraint to sequentially validate nested constraints. * Validation for the nested constraints collection will stop at first violation. * - * @Annotation - * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Maxime Steinhausser */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Time.php b/src/Symfony/Component/Validator/Constraints/Time.php index 994473dc150c1..35e2dcd6133ff 100644 --- a/src/Symfony/Component/Validator/Constraints/Time.php +++ b/src/Symfony/Component/Validator/Constraints/Time.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Timezone.php b/src/Symfony/Component/Validator/Constraints/Timezone.php index 1ba24be9cf271..9c82c98b5ccdc 100644 --- a/src/Symfony/Component/Validator/Constraints/Timezone.php +++ b/src/Symfony/Component/Validator/Constraints/Timezone.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Javier Spagnoletti * @author Hugo Hamon */ diff --git a/src/Symfony/Component/Validator/Constraints/Traverse.php b/src/Symfony/Component/Validator/Constraints/Traverse.php index 2b9930661bb98..ab862cd79cf87 100644 --- a/src/Symfony/Component/Validator/Constraints/Traverse.php +++ b/src/Symfony/Component/Validator/Constraints/Traverse.php @@ -15,8 +15,6 @@ use Symfony\Component\Validator\Exception\ConstraintDefinitionException; /** - * @Annotation - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_CLASS)] diff --git a/src/Symfony/Component/Validator/Constraints/Type.php b/src/Symfony/Component/Validator/Constraints/Type.php index cf61476c40e21..eabb22d43604a 100644 --- a/src/Symfony/Component/Validator/Constraints/Type.php +++ b/src/Symfony/Component/Validator/Constraints/Type.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Ulid.php b/src/Symfony/Component/Validator/Constraints/Ulid.php index a1f2c086ebe5b..19055ee0a794d 100644 --- a/src/Symfony/Component/Validator/Constraints/Ulid.php +++ b/src/Symfony/Component/Validator/Constraints/Ulid.php @@ -14,8 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * * @author Laurent Clouet */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Unique.php b/src/Symfony/Component/Validator/Constraints/Unique.php index d85de6c749364..1d4b23b67bc92 100644 --- a/src/Symfony/Component/Validator/Constraints/Unique.php +++ b/src/Symfony/Component/Validator/Constraints/Unique.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Yevgeniy Zholkevskiy */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Url.php b/src/Symfony/Component/Validator/Constraints/Url.php index 5575e2c2bc7be..08fffae7aca01 100644 --- a/src/Symfony/Component/Validator/Constraints/Url.php +++ b/src/Symfony/Component/Validator/Constraints/Url.php @@ -15,9 +15,6 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/Uuid.php b/src/Symfony/Component/Validator/Constraints/Uuid.php index f397143b1d627..f34413b2b86b1 100644 --- a/src/Symfony/Component/Validator/Constraints/Uuid.php +++ b/src/Symfony/Component/Validator/Constraints/Uuid.php @@ -15,8 +15,6 @@ use Symfony\Component\Validator\Exception\InvalidArgumentException; /** - * @Annotation - * * @author Colin O'Dell * @author Bernhard Schussek */ diff --git a/src/Symfony/Component/Validator/Constraints/Valid.php b/src/Symfony/Component/Validator/Constraints/Valid.php index 5acf87473d486..a924c304ed300 100644 --- a/src/Symfony/Component/Validator/Constraints/Valid.php +++ b/src/Symfony/Component/Validator/Constraints/Valid.php @@ -14,9 +14,6 @@ use Symfony\Component\Validator\Constraint; /** - * @Annotation - * @Target({"PROPERTY", "METHOD", "ANNOTATION"}) - * * @author Bernhard Schussek */ #[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Constraints/When.php b/src/Symfony/Component/Validator/Constraints/When.php index bf10049e47585..a28ee8b4af16e 100644 --- a/src/Symfony/Component/Validator/Constraints/When.php +++ b/src/Symfony/Component/Validator/Constraints/When.php @@ -17,8 +17,6 @@ use Symfony\Component\Validator\Exception\LogicException; /** - * @Annotation - * * @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"}) */ #[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)] diff --git a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php index a3cdfb12047ea..a8d09da2a5690 100644 --- a/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php +++ b/src/Symfony/Component/Validator/Mapping/Loader/AnnotationLoader.php @@ -11,7 +11,6 @@ namespace Symfony\Component\Validator\Mapping\Loader; -use Doctrine\Common\Annotations\Reader; use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Constraints\GroupSequence; @@ -20,29 +19,13 @@ use Symfony\Component\Validator\Mapping\ClassMetadata; /** - * Loads validation metadata using a Doctrine annotation {@link Reader} or using PHP 8 attributes. + * Loads validation metadata using PHP attributes. * * @author Bernhard Schussek * @author Alexander M. Turek */ class AnnotationLoader implements LoaderInterface { - /** - * @deprecated since Symfony 6.4, this property will be removed in 7.0 - * - * @var Reader|null - */ - protected $reader; - - public function __construct(Reader $reader = null) - { - if ($reader) { - trigger_deprecation('symfony/validator', '6.4', 'Passing a "%s" instance as argument 1 to "%s()" is deprecated, pass null or omit the parameter instead.', get_debug_type($reader), __METHOD__); - } - - $this->reader = $reader; - } - public function loadClassMetadata(ClassMetadata $metadata): bool { $reflClass = $metadata->getReflectionClass(); @@ -98,49 +81,14 @@ public function loadClassMetadata(ClassMetadata $metadata): bool private function getAnnotations(\ReflectionMethod|\ReflectionClass|\ReflectionProperty $reflection): iterable { - $dedup = []; - foreach ($reflection->getAttributes(GroupSequence::class) as $attribute) { - $dedup[] = $attribute->newInstance(); yield $attribute->newInstance(); } foreach ($reflection->getAttributes(GroupSequenceProvider::class) as $attribute) { - $dedup[] = $attribute->newInstance(); yield $attribute->newInstance(); } foreach ($reflection->getAttributes(Constraint::class, \ReflectionAttribute::IS_INSTANCEOF) as $attribute) { - $dedup[] = $attribute->newInstance(); yield $attribute->newInstance(); } - if (!$this->reader) { - return; - } - - $annotations = []; - - if ($reflection instanceof \ReflectionClass && $annotations = $this->reader->getClassAnnotations($reflection)) { - trigger_deprecation('symfony/validator', '6.4', 'Class "%s" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.', $reflection->getName()); - } - if ($reflection instanceof \ReflectionMethod && $annotations = $this->reader->getMethodAnnotations($reflection)) { - trigger_deprecation('symfony/validator', '6.4', 'Method "%s::%s()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.', $reflection->getDeclaringClass()->getName(), $reflection->getName()); - } - if ($reflection instanceof \ReflectionProperty && $annotations = $this->reader->getPropertyAnnotations($reflection)) { - trigger_deprecation('symfony/validator', '6.4', 'Property "%s::$%s" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.', $reflection->getDeclaringClass()->getName(), $reflection->getName()); - } - - foreach ($dedup as $annotation) { - if ($annotation instanceof Constraint) { - $annotation->groups; // trigger initialization of the "groups" property - } - } - - foreach ($annotations as $annotation) { - if ($annotation instanceof Constraint) { - $annotation->groups; // trigger initialization of the "groups" property - } - if (!\in_array($annotation, $dedup, false)) { - yield $annotation; - } - } } } diff --git a/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php b/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php index b3305b3c4fe86..db7d615b5fa82 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/WhenTest.php @@ -11,9 +11,7 @@ namespace Symfony\Component\Validator\Tests\Constraints; -use Doctrine\Common\Annotations\AnnotationReader; use PHPUnit\Framework\TestCase; -use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; use Symfony\Component\Validator\Constraints\Callback; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotNull; @@ -26,8 +24,6 @@ final class WhenTest extends TestCase { - use ExpectDeprecationTrait; - public function testMissingOptionsExceptionIsThrown() { $this->expectException(MissingOptionsException::class); @@ -45,89 +41,6 @@ public function testNonConstraintsAreRejected() ]); } - /** - * @group legacy - */ - public function testAnnotations() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - - $loader = new AnnotationLoader(new AnnotationReader()); - $metadata = new ClassMetadata(WhenTestWithAnnotations::class); - - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Constraints\WhenTestWithAnnotations" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Constraints\WhenTestWithAnnotations::$foo" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Constraints\WhenTestWithAnnotations::$bar" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Constraints\WhenTestWithAnnotations::$qux" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Constraints\WhenTestWithAnnotations::getBaz()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - self::assertTrue($loader->loadClassMetadata($metadata)); - - [$classConstraint] = $metadata->getConstraints(); - - self::assertInstanceOf(When::class, $classConstraint); - self::assertSame('true', $classConstraint->expression); - self::assertEquals([ - new Callback([ - 'callback' => 'callback', - 'groups' => ['Default', 'WhenTestWithAnnotations'], - ]), - ], $classConstraint->constraints); - - [$fooConstraint] = $metadata->properties['foo']->getConstraints(); - - self::assertInstanceOf(When::class, $fooConstraint); - self::assertSame('true', $fooConstraint->expression); - self::assertEquals([ - new NotNull([ - 'groups' => ['Default', 'WhenTestWithAnnotations'], - ]), - new NotBlank([ - 'groups' => ['Default', 'WhenTestWithAnnotations'], - ]), - ], $fooConstraint->constraints); - self::assertSame(['Default', 'WhenTestWithAnnotations'], $fooConstraint->groups); - - [$barConstraint] = $metadata->properties['bar']->getConstraints(); - - self::assertInstanceOf(When::class, $fooConstraint); - self::assertSame('false', $barConstraint->expression); - self::assertEquals([ - new NotNull([ - 'groups' => ['foo'], - ]), - new NotBlank([ - 'groups' => ['foo'], - ]), - ], $barConstraint->constraints); - self::assertSame(['foo'], $barConstraint->groups); - - [$quxConstraint] = $metadata->properties['qux']->getConstraints(); - - self::assertInstanceOf(When::class, $quxConstraint); - self::assertSame('true', $quxConstraint->expression); - self::assertEquals([ - new NotNull([ - 'groups' => ['foo'], - ]), - ], $quxConstraint->constraints); - self::assertSame(['foo'], $quxConstraint->groups); - - [$bazConstraint] = $metadata->getters['baz']->getConstraints(); - - self::assertInstanceOf(When::class, $bazConstraint); - self::assertSame('true', $bazConstraint->expression); - self::assertEquals([ - new NotNull([ - 'groups' => ['Default', 'WhenTestWithAnnotations'], - ]), - new NotBlank([ - 'groups' => ['Default', 'WhenTestWithAnnotations'], - ]), - ], $bazConstraint->constraints); - self::assertSame(['Default', 'WhenTestWithAnnotations'], $bazConstraint->groups); - } - public function testAttributes() { $loader = new AnnotationLoader(); @@ -200,36 +113,3 @@ public function testAttributes() self::assertSame(['Default', 'WhenTestWithAttributes'], $bazConstraint->groups); } } - -/** - * @When(expression="true", constraints={@Callback("callback")}) - */ -class WhenTestWithAnnotations -{ - /** - * @When(expression="true", constraints={@NotNull, @NotBlank}) - */ - private $foo; - - /** - * @When(expression="false", constraints={@NotNull, @NotBlank}, groups={"foo"}) - */ - private $bar; - - /** - * @When(expression="true", constraints=@NotNull, groups={"foo"}) - */ - private $qux; - - /** - * @When(expression="true", constraints={@NotNull, @NotBlank}) - */ - public function getBaz() - { - return null; - } - - public function callback() - { - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/Entity.php b/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/Entity.php deleted file mode 100644 index bbfa452b66631..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/Entity.php +++ /dev/null @@ -1,160 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures\Annotation; - -use Symfony\Component\Validator\Constraints as Assert; -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB; - -/** - * @Symfony\Component\Validator\Tests\Fixtures\ConstraintA - * @Assert\GroupSequence({"Foo", "Entity"}) - * @Assert\Callback({"Symfony\Component\Validator\Tests\Fixtures\CallbackClass", "callback"}) - * @Assert\Sequentially({ - * @Assert\Expression("this.getFirstName() != null") - * }) - */ -class Entity extends EntityParent implements EntityInterfaceB -{ - /** - * @Assert\NotNull - * @Assert\Range(min=3) - * @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}), - * @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)}) - * @Assert\Collection(fields={ - * "foo" = {@Assert\NotNull, @Assert\Range(min=3)}, - * "bar" = @Assert\Range(min=5), - * "baz" = @Assert\Required({@Assert\Email()}), - * "qux" = @Assert\Optional({@Assert\NotBlank()}) - * }, allowExtraFields=true) - * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%") - * @Assert\AtLeastOneOf({@Assert\NotNull, @Assert\Range(min=3)}, message="foo", includeInternalMessages=false) - * @Assert\Sequentially({@Assert\NotBlank, @Assert\Range(min=5)}) - */ - public $firstName; - /** - * @Assert\Valid - */ - public $childA; - /** - * @Assert\Valid - */ - public $childB; - protected $lastName; - public $reference; - public $reference2; - private $internal; - public $data = 'Overridden data'; - public $initialized = false; - /** - * @Assert\Type("integer") - */ - protected ?int $other; - - public function __construct($internal = null) - { - $this->internal = $internal; - } - - public function getFirstName() - { - return $this->firstName; - } - - public function getInternal() - { - return $this->internal.' from getter'; - } - - public function setLastName($lastName) - { - $this->lastName = $lastName; - } - - /** - * @Assert\NotNull - */ - public function getLastName() - { - return $this->lastName; - } - - public function getValid() - { - } - - /** - * @Assert\IsTrue - */ - public function isValid() - { - return 'valid'; - } - - /** - * @Assert\IsTrue - */ - public function hasPermissions() - { - return 'permissions'; - } - - public function getData() - { - return 'Overridden data'; - } - - /** - * @Assert\Callback(payload="foo") - */ - public function validateMe(ExecutionContextInterface $context) - { - } - - /** - * @Assert\Callback - */ - public static function validateMeStatic($object, ExecutionContextInterface $context) - { - } - - public function getChildA(): mixed - { - return $this->childA; - } - - /** - * @param mixed $childA - */ - public function setChildA($childA) - { - $this->childA = $childA; - } - - public function getChildB(): mixed - { - return $this->childB; - } - - /** - * @param mixed $childB - */ - public function setChildB($childB) - { - $this->childB = $childB; - } - - public function getReference() - { - return $this->reference; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/EntityParent.php b/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/EntityParent.php deleted file mode 100644 index d938043caded9..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/EntityParent.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures\Annotation; - -use Symfony\Component\Validator\Constraints\NotNull; -use Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceA; - -class EntityParent implements EntityInterfaceA -{ - protected $firstName; - private $internal; - private $data = 'Data'; - private $child; - - /** - * @NotNull - */ - protected ?int $other; - - public function getData() - { - return 'Data'; - } - - public function getChild() - { - return $this->child; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/GroupSequenceProviderEntity.php b/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/GroupSequenceProviderEntity.php deleted file mode 100644 index 447cb6f354885..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/Annotation/GroupSequenceProviderEntity.php +++ /dev/null @@ -1,37 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures\Annotation; - -use Symfony\Component\Validator\Constraints as Assert; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\GroupSequenceProviderInterface; - -/** - * @Assert\GroupSequenceProvider - */ -class GroupSequenceProviderEntity implements GroupSequenceProviderInterface -{ - public $firstName; - public $lastName; - - protected $sequence = []; - - public function __construct($sequence) - { - $this->sequence = $sequence; - } - - public function getGroupSequence(): array|GroupSequence - { - return $this->sequence; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/Entity.php b/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/Entity.php deleted file mode 100644 index aa954144c7c7d..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/Entity.php +++ /dev/null @@ -1,150 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures\Attribute; - -use Symfony\Component\Validator\Constraints as Assert; -use Symfony\Component\Validator\Context\ExecutionContextInterface; -use Symfony\Component\Validator\Tests\Fixtures\CallbackClass; -use Symfony\Component\Validator\Tests\Fixtures\ConstraintA; -use Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceB; - -#[ - ConstraintA, - Assert\GroupSequence(['Foo', 'Entity']), - Assert\Callback([CallbackClass::class, 'callback']), -] -/** - * @Assert\Sequentially({ - * @Assert\Expression("this.getFirstName() != null") - * }) - */ -class Entity extends EntityParent implements EntityInterfaceB -{ - /** - * @Assert\All({@Assert\NotNull, @Assert\Range(min=3)}), - * @Assert\All(constraints={@Assert\NotNull, @Assert\Range(min=3)}) - * @Assert\Collection(fields={ - * "foo" = {@Assert\NotNull, @Assert\Range(min=3)}, - * "bar" = @Assert\Range(min=5), - * "baz" = @Assert\Required({@Assert\Email()}), - * "qux" = @Assert\Optional({@Assert\NotBlank()}) - * }, allowExtraFields=true) - * @Assert\Choice(choices={"A", "B"}, message="Must be one of %choices%") - * @Assert\AtLeastOneOf({@Assert\NotNull, @Assert\Range(min=3)}, message="foo", includeInternalMessages=false) - * @Assert\Sequentially({@Assert\NotBlank, @Assert\Range(min=5)}) - */ - #[ - Assert\NotNull, - Assert\Range(min: 3), - ] - public string $firstName; - #[Assert\Valid] - public $childA; - #[Assert\Valid] - public $childB; - protected $lastName; - public $reference; - public $reference2; - private $internal; - public $data = 'Overridden data'; - public $initialized = false; - #[Assert\Type('integer')] - protected ?int $other; - - public function __construct($internal = null) - { - $this->internal = $internal; - } - - public function getFirstName() - { - return $this->firstName; - } - - public function getInternal() - { - return $this->internal.' from getter'; - } - - public function setLastName($lastName) - { - $this->lastName = $lastName; - } - - #[Assert\NotNull] - public function getLastName() - { - return $this->lastName; - } - - public function getValid() - { - } - - #[Assert\IsTrue] - public function isValid() - { - return 'valid'; - } - - #[Assert\IsTrue] - public function hasPermissions() - { - return 'permissions'; - } - - public function getData() - { - return 'Overridden data'; - } - - #[Assert\Callback(payload: 'foo')] - public function validateMe(ExecutionContextInterface $context) - { - } - - #[Assert\Callback] - public static function validateMeStatic($object, ExecutionContextInterface $context) - { - } - - public function getChildA(): mixed - { - return $this->childA; - } - - /** - * @param mixed $childA - */ - public function setChildA($childA) - { - $this->childA = $childA; - } - - public function getChildB(): mixed - { - return $this->childB; - } - - /** - * @param mixed $childB - */ - public function setChildB($childB) - { - $this->childB = $childB; - } - - public function getReference() - { - return $this->reference; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/EntityParent.php b/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/EntityParent.php deleted file mode 100644 index ca72c0fa98233..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/EntityParent.php +++ /dev/null @@ -1,36 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures\Attribute; - -use Symfony\Component\Validator\Constraints\NotNull; -use Symfony\Component\Validator\Tests\Fixtures\EntityInterfaceA; - -class EntityParent implements EntityInterfaceA -{ - protected string $firstName; - private $internal; - private $data = 'Data'; - private $child; - - #[NotNull] - protected ?int $other; - - public function getData() - { - return 'Data'; - } - - public function getChild() - { - return $this->child; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/GroupSequenceProviderEntity.php b/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/GroupSequenceProviderEntity.php deleted file mode 100644 index db16eef468fa1..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Fixtures/Attribute/GroupSequenceProviderEntity.php +++ /dev/null @@ -1,35 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Fixtures\Attribute; - -use Symfony\Component\Validator\Constraints as Assert; -use Symfony\Component\Validator\Constraints\GroupSequence; -use Symfony\Component\Validator\GroupSequenceProviderInterface; - -#[Assert\GroupSequenceProvider] -class GroupSequenceProviderEntity implements GroupSequenceProviderInterface -{ - public $firstName; - public $lastName; - - protected $sequence = []; - - public function __construct($sequence) - { - $this->sequence = $sequence; - } - - public function getGroupSequence(): array|GroupSequence - { - return $this->sequence; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php index b5cf5ac76cbfa..51e8ae6a7bf2c 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintA.php @@ -13,7 +13,6 @@ use Symfony\Component\Validator\Constraint; -/** @Annotation */ #[\Attribute] class ConstraintA extends Constraint { diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php index 53d43d01fcb38..c70329b8e95fd 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintB.php @@ -13,7 +13,6 @@ use Symfony\Component\Validator\Constraint; -/** @Annotation */ class ConstraintB extends Constraint { public function getTargets(): string|array diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php index e87ed28f48114..8143420ac8953 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintC.php @@ -13,7 +13,6 @@ use Symfony\Component\Validator\Constraint; -/** @Annotation */ class ConstraintC extends Constraint { public $option1; diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php index c1f672793a334..ef64a655ff90e 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValue.php @@ -13,7 +13,6 @@ use Symfony\Component\Validator\Constraint; -/** @Annotation */ class ConstraintWithValue extends Constraint { public $property; diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php index 1cddd4a55de30..8a4944c46e259 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/ConstraintWithValueAsDefault.php @@ -13,7 +13,6 @@ use Symfony\Component\Validator\Constraint; -/** @Annotation */ class ConstraintWithValueAsDefault extends Constraint { public $property; diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php deleted file mode 100644 index 2e34d7d6ea6de..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithHybridAnnotationsTest.php +++ /dev/null @@ -1,82 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Mapping\Loader; - -use Doctrine\Common\Annotations\AnnotationReader; -use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; -use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; - -/** - * @group legacy - */ -class AnnotationLoaderWithHybridAnnotationsTest extends AnnotationLoaderTest -{ - use ExpectDeprecationTrait; - - public function testLoadClassMetadataReturnsTrueIfSuccessful() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity::$firstName" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadClassMetadataReturnsTrueIfSuccessful(); - } - - public function testLoadClassMetadataReturnsFalseIfNotSuccessful() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - - parent::testLoadClassMetadataReturnsFalseIfNotSuccessful(); - } - - public function testLoadClassMetadata() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity::$firstName" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadClassMetadata(); - } - - public function testLoadParentClassMetadata() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - - parent::testLoadParentClassMetadata(); - } - - public function testLoadClassMetadataAndMerge() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Attribute\Entity::$firstName" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadClassMetadataAndMerge(); - } - - public function testLoadGroupSequenceProviderAnnotation() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - - parent::testLoadGroupSequenceProviderAnnotation(); - } - - protected function createAnnotationLoader(): AnnotationLoader - { - return new AnnotationLoader(new AnnotationReader()); - } - - protected function getFixtureNamespace(): string - { - return 'Symfony\Component\Validator\Tests\Fixtures\Attribute'; - } -} diff --git a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php b/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php deleted file mode 100644 index 821fce12b414c..0000000000000 --- a/src/Symfony/Component/Validator/Tests/Mapping/Loader/AnnotationLoaderWithLegacyAnnotationsTest.php +++ /dev/null @@ -1,106 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Validator\Tests\Mapping\Loader; - -use Doctrine\Common\Annotations\AnnotationReader; -use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; -use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; - -/** - * @group legacy - */ -class AnnotationLoaderWithLegacyAnnotationsTest extends AnnotationLoaderTest -{ - use ExpectDeprecationTrait; - - public function testLoadClassMetadataReturnsTrueIfSuccessful() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$firstName" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$childA" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$childB" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::getLastName()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::isValid()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::hasPermissions()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::validateMe()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::validateMeStatic()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadClassMetadataReturnsTrueIfSuccessful(); - } - - public function testLoadClassMetadataReturnsFalseIfNotSuccessful() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - - parent::testLoadClassMetadataReturnsFalseIfNotSuccessful(); - } - - public function testLoadClassMetadata() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$firstName" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$childA" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$childB" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::getLastName()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::isValid()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::hasPermissions()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::validateMe()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::validateMeStatic()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadClassMetadata(); - } - - public function testLoadParentClassMetadata() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\EntityParent::$other" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadParentClassMetadata(); - } - - public function testLoadClassMetadataAndMerge() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\EntityParent::$other" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$firstName" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$childA" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Property "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::$childB" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::getLastName()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::isValid()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::hasPermissions()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::validateMe()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\Tests\Fixtures\Annotation\Entity::validateMeStatic()" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadClassMetadataAndMerge(); - } - - public function testLoadGroupSequenceProviderAnnotation() - { - $this->expectDeprecation('Since symfony/validator 6.4: Passing a "Doctrine\Common\Annotations\AnnotationReader" instance as argument 1 to "Symfony\Component\Validator\Mapping\Loader\AnnotationLoader::__construct()" is deprecated, pass null or omit the parameter instead.'); - $this->expectDeprecation('Since symfony/validator 6.4: Class "Symfony\Component\Validator\Tests\Fixtures\Annotation\GroupSequenceProviderEntity" uses Doctrine Annotations to configure validation constraints, which is deprecated. Use PHP attributes instead.'); - - parent::testLoadGroupSequenceProviderAnnotation(); - } - - protected function createAnnotationLoader(): AnnotationLoader - { - return new AnnotationLoader(new AnnotationReader()); - } - - protected function getFixtureNamespace(): string - { - return 'Symfony\Component\Validator\Tests\Fixtures\Annotation'; - } -} diff --git a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php index 9d0b1b5140bda..ac3d698af9f4a 100644 --- a/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php +++ b/src/Symfony/Component/Validator/Tests/ValidatorBuilderTest.php @@ -11,13 +11,9 @@ namespace Symfony\Component\Validator\Tests; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; use PHPUnit\Framework\TestCase; use Psr\Cache\CacheItemPoolInterface; -use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait; use Symfony\Component\Validator\ConstraintValidatorFactoryInterface; -use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader; use Symfony\Component\Validator\ObjectInitializerInterface; use Symfony\Component\Validator\Validator\RecursiveValidator; use Symfony\Component\Validator\ValidatorBuilder; @@ -25,8 +21,6 @@ class ValidatorBuilderTest extends TestCase { - use ExpectDeprecationTrait; - private ValidatorBuilder $builder; protected function setUp(): void @@ -81,46 +75,6 @@ public function testAddMethodMappings() $this->assertSame($this->builder, $this->builder->addMethodMappings([])); } - /** - * @group legacy - */ - public function testEnableAnnotationMappingWithDefaultDoctrineAnnotationReader() - { - $this->assertSame($this->builder, $this->builder->enableAnnotationMapping()); - - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::addDefaultDoctrineAnnotationReader()" is deprecated without replacement.'); - $this->assertSame($this->builder, $this->builder->addDefaultDoctrineAnnotationReader()); - - $loaders = $this->builder->getLoaders(); - $this->assertCount(1, $loaders); - $this->assertInstanceOf(AnnotationLoader::class, $loaders[0]); - - $r = new \ReflectionProperty(AnnotationLoader::class, 'reader'); - - $this->assertInstanceOf(PsrCachedReader::class, $r->getValue($loaders[0])); - } - - /** - * @group legacy - */ - public function testEnableAnnotationMappingWithCustomDoctrineAnnotationReader() - { - $reader = $this->createMock(Reader::class); - - $this->assertSame($this->builder, $this->builder->enableAnnotationMapping()); - - $this->expectDeprecation('Since symfony/validator 6.4: Method "Symfony\Component\Validator\ValidatorBuilder::setDoctrineAnnotationReader()" is deprecated without replacement.'); - $this->assertSame($this->builder, $this->builder->setDoctrineAnnotationReader($reader)); - - $loaders = $this->builder->getLoaders(); - $this->assertCount(1, $loaders); - $this->assertInstanceOf(AnnotationLoader::class, $loaders[0]); - - $r = new \ReflectionProperty(AnnotationLoader::class, 'reader'); - - $this->assertSame($reader, $r->getValue($loaders[0])); - } - public function testDisableAnnotationMapping() { $this->assertSame($this->builder, $this->builder->disableAnnotationMapping()); diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 88fd21645c180..f0184a58be302 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -11,13 +11,8 @@ namespace Symfony\Component\Validator; -use Doctrine\Common\Annotations\AnnotationReader; -use Doctrine\Common\Annotations\PsrCachedReader; -use Doctrine\Common\Annotations\Reader; use Psr\Cache\CacheItemPoolInterface; -use Symfony\Component\Cache\Adapter\ArrayAdapter; use Symfony\Component\Validator\Context\ExecutionContextFactory; -use Symfony\Component\Validator\Exception\LogicException; use Symfony\Component\Validator\Exception\ValidatorException; use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface; @@ -48,7 +43,6 @@ class ValidatorBuilder private array $xmlMappings = []; private array $yamlMappings = []; private array $methodMappings = []; - private ?Reader $annotationReader = null; private bool $enableAnnotationMapping = false; private ?MetadataFactoryInterface $metadataFactory = null; private ConstraintValidatorFactoryInterface $validatorFactory; @@ -210,35 +204,6 @@ public function enableAnnotationMapping(): static public function disableAnnotationMapping(): static { $this->enableAnnotationMapping = false; - $this->annotationReader = null; - - return $this; - } - - /** - * @deprecated since Symfony 6.4 without replacement - * - * @return $this - */ - public function setDoctrineAnnotationReader(?Reader $reader): static - { - trigger_deprecation('symfony/validator', '6.4', 'Method "%s()" is deprecated without replacement.', __METHOD__); - - $this->annotationReader = $reader; - - return $this; - } - - /** - * @deprecated since Symfony 6.4 without replacement - * - * @return $this - */ - public function addDefaultDoctrineAnnotationReader(): static - { - trigger_deprecation('symfony/validator', '6.4', 'Method "%s()" is deprecated without replacement.', __METHOD__); - - $this->annotationReader = $this->createAnnotationReader(); return $this; } @@ -345,7 +310,7 @@ public function getLoaders(): array } if ($this->enableAnnotationMapping) { - $loaders[] = new AnnotationLoader($this->annotationReader); + $loaders[] = new AnnotationLoader(); } return array_merge($loaders, $this->loaders); @@ -389,17 +354,4 @@ public function getValidator(): ValidatorInterface return new RecursiveValidator($contextFactory, $metadataFactory, $validatorFactory, $this->initializers); } - - private function createAnnotationReader(): Reader - { - if (!class_exists(AnnotationReader::class)) { - throw new LogicException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and symfony/cache to be installed.'); - } - - if (class_exists(ArrayAdapter::class)) { - return new PsrCachedReader(new AnnotationReader(), new ArrayAdapter()); - } - - throw new LogicException('Enabling annotation based constraint mapping requires the packages doctrine/annotations and symfony/cache to be installed.'); - } } diff --git a/src/Symfony/Component/Validator/composer.json b/src/Symfony/Component/Validator/composer.json index 898e318ad242e..a9d5cced1e647 100644 --- a/src/Symfony/Component/Validator/composer.json +++ b/src/Symfony/Component/Validator/composer.json @@ -38,11 +38,9 @@ "symfony/property-access": "^6.4|^7.0", "symfony/property-info": "^6.4|^7.0", "symfony/translation": "^6.4|^7.0", - "doctrine/annotations": "^1.13|^2", "egulias/email-validator": "^2.1.10|^3|^4" }, "conflict": { - "doctrine/annotations": "<1.13", "doctrine/lexer": "<1.1", "symfony/dependency-injection": "<6.4", "symfony/expression-language": "<6.4", pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy