Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[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

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 16, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? yes
Issues Fix #60029
License MIT

@xabbuh xabbuh force-pushed the issue-60029 branch 2 times, most recently from e6f87d8 to b08f6af Compare June 20, 2025 12:08
@xabbuh xabbuh requested a review from chalasr as a code owner June 20, 2025 12:08
---

* 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.
Copy link
Member

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 ?

Copy link
Member Author

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

@xabbuh xabbuh force-pushed the issue-60029 branch 7 times, most recently from 9bdaa28 to fe67424 Compare June 21, 2025 11:48
@xabbuh
Copy link
Member Author

xabbuh commented Jun 21, 2025

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.

@xabbuh xabbuh requested a review from yceruto June 21, 2025 11:53
UPGRADE-7.4.md Outdated
Validator
---------

* Deprecate evaluating options in the base `Constraint` class. Initialize properties in the constructor of the concrete constraint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* 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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Validator] Refactor without magic methods / class
4 participants