Skip to content

Commit f238619

Browse files
[FrameworkBundle][Validator] Deprecate annotation occurrences
1 parent 439c9ea commit f238619

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Validator/Constraints/UserPasswordTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use PHPUnit\Framework\TestCase;
1515
use Symfony\Component\Security\Core\Validator\Constraints\UserPassword;
1616
use Symfony\Component\Validator\Mapping\ClassMetadata;
17-
use Symfony\Component\Validator\Mapping\Loader\AnnotationLoader;
17+
use Symfony\Component\Validator\Mapping\Loader\AttributeLoader;
1818

1919
class UserPasswordTest extends TestCase
2020
{
@@ -40,15 +40,15 @@ public static function provideServiceValidatedConstraints(): iterable
4040
yield 'named arguments' => [new UserPassword(service: 'my_service')];
4141

4242
$metadata = new ClassMetadata(UserPasswordDummy::class);
43-
self::assertTrue((new AnnotationLoader())->loadClassMetadata($metadata));
43+
self::assertTrue((new AttributeLoader())->loadClassMetadata($metadata));
4444

4545
yield 'attribute' => [$metadata->properties['b']->constraints[0]];
4646
}
4747

4848
public function testAttributes()
4949
{
5050
$metadata = new ClassMetadata(UserPasswordDummy::class);
51-
self::assertTrue((new AnnotationLoader())->loadClassMetadata($metadata));
51+
self::assertTrue((new AttributeLoader())->loadClassMetadata($metadata));
5252

5353
[$bConstraint] = $metadata->properties['b']->getConstraints();
5454
self::assertSame('myMessage', $bConstraint->message);

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"symfony/ldap": "^5.4|^6.0|^7.0",
3333
"symfony/string": "^5.4|^6.0|^7.0",
3434
"symfony/translation": "^5.4|^6.0|^7.0",
35-
"symfony/validator": "^5.4|^6.0|^7.0",
35+
"symfony/validator": "^6.4|^7.0",
3636
"psr/log": "^1|^2|^3"
3737
},
3838
"conflict": {

0 commit comments

Comments
 (0)