<?php
use Symfony\Component\Validator\Constraints as Assert;
final class DemoFile
{
#[Assert\Sequentially(
constraints: [
new Assert\Choice(
options: ['New York', 'Berlin', 'Tokyo'],
message: 'Choose a valid genre.'
),
new Assert\Count(min: 1),
],
)]
public string $city;
}
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/aa3b9a7a-31bb-459e-ad2a-ae5926507c7f
Responsible rules
ConstraintOptionsToNamedArgumentsRectorExpected Behavior
The rule shouldn't remove options from the constraint