symfony-docs icon indicating copy to clipboard operation
symfony-docs copied to clipboard

Fix parent constructor call to use null instead of empty array

Open ReeceG opened this issue 4 weeks ago • 1 comments

This is the new method that prevents the following deprecation message: Since symfony/validator 7.4: Support for evaluating options in the base Constraint class is deprecated. Initialize properties in the constructor of App\Validator\Custom instead Honestly I don't totally understand what the "mode" option/variable in the 2nd and 3rd examples is doing so I'm not sure if some other change needs to be made for those ones.

ReeceG avatar Dec 03 '25 18:12 ReeceG

Honestly I don't totally understand what the "mode" option/variable in the 2nd and 3rd examples is doing so I'm not sure if some other change needs to be made for those ones.

Those are examples of settings support by that custom constraint.

stof avatar Dec 03 '25 18:12 stof

Thank you @ReeceG.

javiereguiluz avatar Dec 15 '25 07:12 javiereguiluz