Skip to content

[Validator] remove deprecated features #22795

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

Merged

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented May 20, 2017

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? yes
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

@xabbuh xabbuh added this to the 4.0 milestone May 20, 2017
@xabbuh xabbuh force-pushed the validator-remove-deprecated-features branch 2 times, most recently from 900b5a9 to cd5c7aa Compare May 20, 2017 07:23
@@ -59,7 +59,7 @@ public function validate($value, Constraint $constraint)
}

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);
throw new \RuntimeException('The "strict" option of the Choice constraint should not be used.');
Copy link
Contributor

@ro0NL ro0NL May 20, 2017

Choose a reason for hiding this comment

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

You can remove the entire option right? given

... and will be removed in 4.0.

Copy link
Member Author

Choose a reason for hiding this comment

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

We cannot completely remove the option as that would break code that was valid in 3.4 (as the base Constraint class would complain about an unknown option while setting the strict option to true is the forward compatible change to be made in 3.x).

Copy link
Member

Choose a reason for hiding this comment

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

we should remove any use of the "strict" property in the class, isn't it?

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, done

@xabbuh xabbuh force-pushed the validator-remove-deprecated-features branch from cd5c7aa to ad7a3cb Compare May 20, 2017 13:57
@nicolas-grekas
Copy link
Member

FC layer missing in 3.4?

@xabbuh
Copy link
Member Author

xabbuh commented May 20, 2017

I don't think so. You just have to always set the option to true. We can deprecate it in 4.1. Similar to what we did with the choices_as_values option in the Form component.

@xabbuh
Copy link
Member Author

xabbuh commented May 21, 2017

see #22815

nicolas-grekas added a commit that referenced this pull request May 21, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

do not used deprecated validator test case class

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22795 (comment)
| License       | MIT
| Doc PR        |

Commits
-------

f20885e do not used deprecated validator test case class
@xabbuh xabbuh force-pushed the validator-remove-deprecated-features branch from ad7a3cb to 46c9101 Compare May 21, 2017 09:09
@xabbuh
Copy link
Member Author

xabbuh commented May 21, 2017

tests are green, ready to be reviewed

@xabbuh xabbuh force-pushed the validator-remove-deprecated-features branch from 46c9101 to bbd656b Compare May 21, 2017 10:14
@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit bbd656b into symfony:master May 21, 2017
nicolas-grekas added a commit that referenced this pull request May 21, 2017
This PR was merged into the 4.0-dev branch.

Discussion
----------

[Validator] remove deprecated features

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Commits
-------

bbd656b [Validator] remove deprecated features
@xabbuh xabbuh deleted the validator-remove-deprecated-features branch May 21, 2017 10:30
@fabpot fabpot mentioned this pull request Oct 19, 2017
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.

4 participants