Skip to content

ChoiceValidator trigger error #20779

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

Closed
pengend opened this issue Dec 6, 2016 · 4 comments
Closed

ChoiceValidator trigger error #20779

pengend opened this issue Dec 6, 2016 · 4 comments

Comments

@pengend
Copy link

pengend commented Dec 6, 2016

In ChoiceValidator.php, an error is triggered when the options strict is false
if (false === $constraint->strict) { @trigger_error('Setting the strict option of the Choice constraint to false is deprecated since version 3.2 and will be removed in 4.0.', E_USER_DEPRECATED); }

But the option is set to false by default in Choice.php
public $strict = false;

@Simperfit
Copy link
Contributor

Simperfit commented Dec 6, 2016

As settled in the UPGRADE-3.2.md, I think this is intended because it will change in 4.0.

@peterrehm , did I understand that wrongly ?

@pengend
Copy link
Author

pengend commented Dec 6, 2016

@Simperfit If this is indended, strict option becomes necessary for every choice annotation, not very convenient if bridge is enabled...

@Simperfit
Copy link
Contributor

@pengend I found the PR, you can check it to understand the goal of this deprecation : #19257

@peterrehm
Copy link
Contributor

peterrehm commented Dec 6, 2016

@pengend This was the only way to properly switch over to a strict handling which is what you want in general. For more info see #19257

@pengend pengend closed this as completed Dec 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants