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

Skip to content

[2.7] Remove BC api version in Validator #13358

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
wants to merge 1 commit into from

Conversation

saro0h
Copy link
Contributor

@saro0h saro0h commented Jan 10, 2015

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

Linked to PR #13338 (comment).

@saro0h saro0h force-pushed the remove-validator-25-bc branch from 7f8d9a0 to 8a4eae9 Compare January 10, 2015 21:06
@saro0h saro0h changed the title [2.7] Remove BC api version in Validator [2.7] [WIP] Remove BC api version in Validator Jan 10, 2015
* The Validator API provided by Symfony 2.5 and newer with a backwards
* compatibility layer for 2.4 and older.
*/
const API_VERSION_2_5_BC = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

BC break

@saro0h saro0h force-pushed the remove-validator-25-bc branch 7 times, most recently from 1c8bbc4 to bf8d57b Compare January 11, 2015 01:28
@saro0h saro0h changed the title [2.7] [WIP] Remove BC api version in Validator [2.7] Remove BC api version in Validator Jan 11, 2015
@saro0h
Copy link
Contributor Author

saro0h commented Jan 11, 2015

Ping @fabpot : Can you take a look at this one ?

@saro0h saro0h force-pushed the remove-validator-25-bc branch from bf8d57b to 7a758e4 Compare January 11, 2015 01:30
@fabpot
Copy link
Member

fabpot commented Jan 11, 2015

@saro0h Unfortunately, I fail to explain what needed to be done. I won't have time today but let's talk about this one on Monday.

@saro0h
Copy link
Contributor Author

saro0h commented Jan 11, 2015

Sure

@saro0h saro0h force-pushed the remove-validator-25-bc branch from 7a758e4 to c3c65ef Compare January 11, 2015 09:03
@@ -321,32 +321,11 @@ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor)
/**
* {@inheritdoc}
*/
public function setApiVersion($apiVersion)
Copy link
Member

Choose a reason for hiding this comment

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

This cannot be removed (BC break)

@stof
Copy link
Member

stof commented Jan 18, 2015

@saro0h what needs to be done is moving everything which is in the LegacyValidator to its parent class RecursiveValidator directly (having the BC layer in the new class directly thanks to the bump to PHP 5.3.9+). The LegacyValidator would then become a deprecated child of the RecursiveValidator with no extra code in it.

The 2.5 and 2.5-bc APIs would then be exactly the same (as we would be able to put the BC layer in 2.5 directly). The concept of API level needs to be kept for the case of the 2.4 API (using it is already deprecated)

@saro0h
Copy link
Contributor Author

saro0h commented Jan 19, 2015

Here you go, I did it here: #13458

I close this PR as, hopefully, I will be able to do this work in 3.0.

@saro0h saro0h closed this Jan 19, 2015
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