-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] deprecate handling options in the base Constraint class #60801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 7.4
Are you sure you want to change the base?
Conversation
xabbuh
commented
Jun 16, 2025
Q | A |
---|---|
Branch? | 7.4 |
Bug fix? | no |
New feature? | no |
Deprecations? | yes |
Issues | Fix #60029 |
License | MIT |
src/Symfony/Component/Validator/Attribute/InitializesOptions.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Validator/Tests/Constraints/AtLeastOneOfValidatorTest.php
Outdated
Show resolved
Hide resolved
e6f87d8
to
b08f6af
Compare
--- | ||
|
||
* Deprecate evaluating options in the base `Constraint`. Initialize properties in the constructor of the concrete constraint | ||
class instead and add the `#[InitializesOptions]` attribute to opt-out of the deprecated behaviour. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't InitializesOptions
gone now ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, changelog and upgrade file updated accordingly
9bdaa28
to
fe67424
Compare
I think this is now ready. I have also added some more details to the changelog/upgrade files to explain how to update custom constraints around the several deprecations. |
UPGRADE-7.4.md
Outdated
Validator | ||
--------- | ||
|
||
* Deprecate evaluating options in the base `Constraint` class. Initialize properties in the constructor of the concrete constraint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Deprecate evaluating options in the base `Constraint` class. Initialize properties in the constructor of the concrete constraint | |
* Deprecate evaluating options in the base `Constraint` class. Initialize properties in the constructor of the concrete constraint |
Same for the others and indention for the inner data + 1 space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed