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
@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

public function __construct($option1 = null, $option2 = null)
{
parent::__construct();
Copy link
Member

Choose a reason for hiding this comment

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

I suggest showing passing the groups to the parent in the After code (as the Before code passing the array of options supports groups in the options)

public $option1;
public $option2;

public function __construct($option1 = null, $option2 = null)
Copy link
Member

Choose a reason for hiding this comment

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

this missing the HasNamedArgument attribute that is required to make the constraint compatible with XML and Yaml file loaders (for attributes, it depends on how the constructor is used so the component attribute is not necessary, but it does not hurt and the changelog should support both cases)

Copy link
Member

Choose a reason for hiding this comment

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

this also applies to the component changelog of course.

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy