Closed
Description
Symfony version(s) affected
5.4
Description
Before this symfony/validator@b125357
$violations = $this->validator->validate(
$input,
new Assert\Collection([
'channelName' => null,
'reportType' => null,
'period' => new Assert\Choice(
choices: (new CreateReportScheduleSpecification())->getPeriodAllowableValues(),
),
]),
);
After this symfony/validator@b125357
$violations = $this->validator->validate(
$input,
new Assert\Collection([
'fields' => [
'channelName' => null,
'reportType' => null,
'period' => new Assert\Choice(
choices: (new CreateReportScheduleSpecification())->getPeriodAllowableValues(),
),
],
]),
);
@nicolas-grekas My application stopped working as before after this commit.
How to reproduce
$input = [
'channelName' => $input->getArgument('channelName'),
'reportType' => $input->getArgument('reportType'),
'period' => $input->getArgument('period'),
];
$violations = $this->validator->validate(
$input,
new Assert\Collection([
'channelName' => null,
'reportType' => null,
'period' => new Assert\Choice(
choices: (new CreateReportScheduleSpecification())->getPeriodAllowableValues(),
),
]),
);
Possible Solution
No response
Additional Context
No response