Support named parameters for the constraint constructor
Symfony 7.4 is deprecating support for configuring options through an array of options. Constraints are expected to support named parameters instead.
The constraint should be migrated to support using named parameters, deprecating the usage of the array of options. Adding support for Symfony 8 will require either doing a major version of this package dropping support for the array entirely or processing the array manually.
@barbieswimcrew what is your preferred approach for the way to support Symfony 8 ? This choice might influence the way I would write the compat layer.
Hi @stof , thanks a lot for raising this!
I’d prefer to move towards supporting named parameters while keeping backward compatibility for now — so a compat layer that still handles the array-based options would make sense.
Then, in a future major release, we could drop the array handling entirely and rely solely on named parameters.
If that approach sounds good to you, feel free to build the compat layer in that direction. Many thanks in advance!