-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Validator] removed deprecated features in Validator and Form #16024
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
Conversation
fabpot
commented
Sep 30, 2015
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | n/a |
License | MIT |
Doc PR | n/a |
1107d80
to
f523d9d
Compare
8032708
to
5f334ca
Compare
Seems that tests in the Form component are failing on the 2.8 build. |
@@ -86,7 +73,6 @@ public function configureOptions(OptionsResolver $resolver) | |||
)); | |||
|
|||
$resolver->setNormalizer('constraints', $constraintsNormalizer); | |||
$resolver->setNormalizer('cascade_validation', $cascadeValidationNormalizer); |
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.
you also need to remove the option from the defaults
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.
done
e33de53
to
104db76
Compare
some tests for deps=low are broken in the component (the error reporting is broken because of an issue in PHPUnit 4.8 on PHP 7) |
* | ||
* @return string The type name. | ||
*/ | ||
public function getName(); |
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.
Can someone confirm that this is indeed deprecated and must be removed in 3.0?
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.
it is
See #16041 for the issue with PHPUnit error reporting on PHP 7 |
50a6564
to
2b10290
Compare
Rebased on current master to see if PHP7 issues are fixed by @stof phpunit version change for PHP7. |
7a871c4
to
8602e24
Compare
Let's stop here for now; not all deprecations are taken care of, but most of them are. The remaining are not trivial to handle and will be part of another PR. Ready for review: ping @symfony/deciders |
Tests are failing. |
8602e24
to
aa365eb
Compare
hopefully, tests pass now. Let's wait for Travis. |
aa365eb
to
33f3400
Compare
Tests pass. Not sure about PHP 7 though. |
there are only 3 failing tests now: 1 is fixed by #16050 and 2 other are unrelated security tests Good to merge 👍 |
…nd Form (fabpot) This PR was merged into the 3.0-dev branch. Discussion ---------- [Validator] removed deprecated features in Validator and Form | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Commits ------- 33f3400 [Form] removed deprecated features 582f3a3 [Form] removed deprecated FormType::getName() bfba6ca [Form] removed precision option 17cedd3 [Form] removed usage of Validator deprecated features 8fd32ba [Validator] remove the API_VERSION 2a6b629 [Validator] removed deprecated methods 925ecaf [Validator] removed deprecated features in Constraints
This PR was submitted for the master branch but it was merged into the 3.0 branch instead (closes #16752). Discussion ---------- [Form] document changes to form type interfaces | Q | A | ------------- | --- | Fixed tickets | #13407, #16024, #16724, #16749 | License | MIT Commits ------- b297a0c [Form] document changes to form type interfaces
…ozsef) This PR was merged into the 3.0 branch. Discussion ---------- [Validator] Remove calls to non-existing method | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - This PR removes some useless code after #16024. **1.** [ConstraintValidator::buildViolation()](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Validator/ConstraintValidator.php#L64) marked as deprecated in [2.8](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Validator/ConstraintValidator.php#L64), and has been removed in [3.0](https://github.com/symfony/symfony/blob/3.0/src/Symfony/Component/Validator/ConstraintValidator.php#L51). But all the ```Symfony/Component/Validator/Constraints/*```validators still making calls to this parent method. **2.** Correct me if I'm wrong, but this condition: ```php $this->context instanceof ExecutionContextInterface ``` in the ```Symfony/Component/Validator/Constraints/*``` validators is useless since 3.0, because the ```$context``` can only be ```ExecutionContextInterface```. I guess the porpuse of this condition was, that in 2.8 there was a [legacy interface](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php#L63) too. And AFAIK, the ```$context``` is [always initialized](https://github.com/symfony/symfony/blob/3.0/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L842) before validation, so no need to check that ```$context``` is whether null or not. **3.** The return value of [ExecutionContextInterface::getViolations()](https://github.com/symfony/symfony/blob/3.0/src/Symfony/Component/Validator/Context/ExecutionContextInterface.php#L239), is in a different namespace, so it should be used. Commits ------- 37fb4e2 Remove calls to non-existing method
…straints (Koc) This PR was merged into the 3.2 branch. Discussion ---------- [Form] Removed references for non existent validator constraints | Q | A | ------------- | --- | Branch? | 3.2 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | follow-up of #16024 | License | MIT | Doc PR | - <!-- - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the 3.4, legacy code removals go to the master branch. - Please fill in this template according to the PR you're about to submit. - Replace this comment by a description of what your PR is solving. --> Commits ------- bfd9c2c Removed references for non existent validator constraints