Skip to content

Commit 204f2b3

Browse files
Merge branch '6.4' into 7.0
* 6.4: [FrameworkBundle][Validator] Replace annotation by attribute [Validator] Add annotation in Constraint [Lock] Add some missing return types in tests [Clock] Throw `DateMalformedStringException`/`DateInvalidTimeZoneException` when appropriate [VarExporter] Remove unused test files [FrameworkBundle] Remove unused test file [DependencyInjection] Remove unused test file [DomCrawler] Added argument `$default` to method `Crawler::attr()` [HttpKernel] Fix missing Request in RequestStack for StreamedResponse Psalm: Ignore UnusedClass errors fix(console): avoid multiple new line when message already ends with a new line
2 parents 812dc0d + 169bfc8 commit 204f2b3

File tree

3 files changed

+11
-13
lines changed

3 files changed

+11
-13
lines changed

Constraint.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ abstract class Constraint
4646

4747
/**
4848
* Maps error codes to the names of their constants.
49+
*
50+
* @var array<string, string>
4951
*/
5052
protected const ERROR_NAMES = [];
5153

Tests/Constraints/Fixtures/ChildA.php

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@
1515

1616
class ChildA
1717
{
18-
/**
19-
* @Assert\Valid
20-
* @Assert\NotNull
21-
* @Assert\NotBlank
22-
*/
18+
#[Assert\Valid]
19+
#[Assert\NotNull]
20+
#[Assert\NotBlank]
2321
public $name;
2422
/**
2523
* @var ChildB
26-
* @Assert\Valid
27-
* @Assert\NotNull
2824
*/
25+
#[Assert\Valid]
26+
#[Assert\NotNull]
2927
public $childB;
3028
}

Tests/Constraints/Fixtures/ChildB.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,13 @@
1515

1616
class ChildB
1717
{
18-
/**
19-
* @Assert\Valid
20-
* @Assert\NotBlank
21-
*/
18+
#[Assert\Valid]
19+
#[Assert\NotBlank]
2220
public $name;
2321
/**
2422
* @var ChildA
25-
* @Assert\Valid
26-
* @Assert\NotBlank
2723
*/
24+
#[Assert\Valid]
25+
#[Assert\NotBlank]
2826
public $childA;
2927
}

0 commit comments

Comments
 (0)