Skip to content

Commit 0d7c20a

Browse files
bug #54716 [Validator] add missing HasNamedArguments attribute (xabbuh)
This PR was merged into the 7.1 branch. Discussion ---------- [Validator] add missing HasNamedArguments attribute | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 56e7867 add missing HasNamedArguments attribute
2 parents 3903840 + 56e7867 commit 0d7c20a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Validator\Constraints;
1313

14+
use Symfony\Component\Validator\Attribute\HasNamedArguments;
1415
use Symfony\Component\Validator\Constraint;
1516
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
1617

@@ -26,6 +27,7 @@ final class Charset extends Constraint
2627
self::BAD_ENCODING_ERROR => 'BAD_ENCODING_ERROR',
2728
];
2829

30+
#[HasNamedArguments]
2931
public function __construct(
3032
public array|string $encodings = [],
3133
public string $message = 'The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.',

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Validator\Constraints;
1313

14+
use Symfony\Component\Validator\Attribute\HasNamedArguments;
1415
use Symfony\Component\Validator\Constraint;
1516
use Symfony\Component\Validator\Exception\ConstraintDefinitionException;
1617

@@ -65,6 +66,7 @@ class MacAddress extends Constraint
6566
/**
6667
* @param self::ALL*|self::LOCAL_*|self::UNIVERSAL_*|self::UNICAST_*|self::MULTICAST_*|self::BROADCAST $type A mac address type to validate (defaults to {@see self::ALL})
6768
*/
69+
#[HasNamedArguments]
6870
public function __construct(
6971
public string $message = 'This value is not a valid MAC address.',
7072
public string $type = self::ALL,

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