Skip to content

Commit 0a9cba3

Browse files
committed
minor symfony#54574 [Validator] Document Compound::getConstraints options (VincentLanglet)
This PR was squashed before being merged into the 7.1 branch. Discussion ---------- [Validator] Document `Compound::getConstraints` options | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Fix #... | License | MIT The array options is not documented in `Compoung::getConstraints`. Looking at the usage ``` $this->getConstraints($this->normalizeOptions($options)); ``` I think it should be `array<string, mixed>`. Commits ------- d4a99ee [Validator] Document `Compound::getConstraints` options
2 parents c29b7a9 + d4a99ee commit 0a9cba3

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/Symfony/Component/Validator/Constraint.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ public function __construct(mixed $options = null, ?array $groups = null, mixed
121121
}
122122
}
123123

124+
/**
125+
* @return array<string, mixed>
126+
*/
124127
protected function normalizeOptions(mixed $options): array
125128
{
126129
$normalizedOptions = [];

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ final public function validatedBy(): string
4646
}
4747

4848
/**
49+
* @param array<string, mixed> $options
50+
*
4951
* @return Constraint[]
5052
*/
5153
abstract protected function getConstraints(array $options): array;

0 commit comments

Comments
 (0)