Skip to content

Commit ffe6f08

Browse files
feature #51085 [Validator] Remove Doctrine annotations support (derrabus)
This PR was merged into the 7.0 branch. Discussion ---------- [Validator] Remove Doctrine annotations support | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Follows #50982 | License | MIT | Doc PR | symfony/symfony-docs#18589 Commits ------- d18dfa5 [Validator] Remove Doctrine annotations support
2 parents badd6e4 + d18dfa5 commit ffe6f08

File tree

94 files changed

+12
-1141
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+12
-1141
lines changed

UPGRADE-7.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,10 @@ Validator
316316
* Remove static property `$errorNames` from all constraints, use const `ERROR_NAMES` instead
317317
* Remove `VALIDATION_MODE_LOOSE` from `Email` constraint, use `VALIDATION_MODE_HTML5` instead
318318
* Remove constraint `ExpressionLanguageSyntax`, use `ExpressionSyntax` instead
319+
* Remove Doctrine annotations support in favor of native attributes
320+
* Remove the annotation reader parameter from the constructor signature of `AnnotationLoader`
321+
* Remove `ValidatorBuilder::setDoctrineAnnotationReader()`
322+
* Remove `ValidatorBuilder::addDefaultDoctrineAnnotationReader()`
319323

320324
VarDumper
321325
---------

src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
/**
1717
* Constraint for the Unique Entity validator.
1818
*
19-
* @Annotation
20-
* @Target({"CLASS", "ANNOTATION"})
21-
*
2219
* @author Benjamin Eberlei <kontakt@beberlei.de>
2320
*/
2421
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]

src/Symfony/Component/Security/Core/Validator/Constraints/UserPassword.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@
1313

1414
use Symfony\Component\Validator\Constraint;
1515

16-
/**
17-
* @Annotation
18-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
19-
*/
2016
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]
2117
class UserPassword extends Constraint
2218
{

src/Symfony/Component/Validator/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ CHANGELOG
1010
* Remove static property `$errorNames` from all constraints, use const `ERROR_NAMES` instead
1111
* Remove `VALIDATION_MODE_LOOSE` from `Email` constraint, use `VALIDATION_MODE_HTML5` instead
1212
* Remove constraint `ExpressionLanguageSyntax`, use `ExpressionSyntax` instead
13+
* Remove Doctrine annotations support in favor of native attributes
14+
* Remove the annotation reader parameter from the constructor signature of `AnnotationLoader`
15+
* Remove `ValidatorBuilder::setDoctrineAnnotationReader()`
16+
* Remove `ValidatorBuilder::addDefaultDoctrineAnnotationReader()`
1317

1418
6.4
1519
---

src/Symfony/Component/Validator/Constraints/All.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
namespace Symfony\Component\Validator\Constraints;
1313

1414
/**
15-
* @Annotation
16-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
17-
*
1815
* @author Bernhard Schussek <bschussek@gmail.com>
1916
*/
2017
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]

src/Symfony/Component/Validator/Constraints/AtLeastOneOf.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
namespace Symfony\Component\Validator\Constraints;
1313

1414
/**
15-
* @Annotation
16-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
17-
*
1815
* @author Przemysław Bogusz <przemyslaw.bogusz@tubotax.pl>
1916
*/
2017
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]

src/Symfony/Component/Validator/Constraints/Bic.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
use Symfony\Component\Validator\Exception\LogicException;
1919

2020
/**
21-
* @Annotation
22-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
23-
*
2421
* @author Michael Hirschler <michael.vhirsch@gmail.com>
2522
*/
2623
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]

src/Symfony/Component/Validator/Constraints/Blank.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
use Symfony\Component\Validator\Constraint;
1515

1616
/**
17-
* @Annotation
18-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
19-
*
2017
* @author Bernhard Schussek <bschussek@gmail.com>
2118
*/
2219
#[\Attribute(\Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]

src/Symfony/Component/Validator/Constraints/Callback.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
use Symfony\Component\Validator\Constraint;
1515

1616
/**
17-
* @Annotation
18-
* @Target({"CLASS", "PROPERTY", "METHOD", "ANNOTATION"})
19-
*
2017
* @author Bernhard Schussek <bschussek@gmail.com>
2118
*/
2219
#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::TARGET_PROPERTY | \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE)]

src/Symfony/Component/Validator/Constraints/CardScheme.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616
/**
1717
* Metadata for the CardSchemeValidator.
1818
*
19-
* @Annotation
20-
* @Target({"PROPERTY", "METHOD", "ANNOTATION"})
21-
*
2219
* @author Tim Nagel <t.nagel@infinite.net.au>
2320
* @author Bernhard Schussek <bschussek@gmail.com>
2421
*/

0 commit comments

Comments
 (0)
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