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

Skip to content

Remove the API version in the validator component #13517

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 2 commits into from

Conversation

fabpot
Copy link
Member

@fabpot fabpot commented Jan 25, 2015

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #13458
License MIT
Doc PR n/a

// The following code must be removed in 3.0
$numArgs = func_num_args();
if ($numArgs > 3) {
trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED);
Copy link
Member

Choose a reason for hiding this comment

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

the method itself is not deprecated. Only the signature with more arguments

@stof
Copy link
Member

stof commented Jan 26, 2015

The RecursiveValidator needs to implement the legacy interface too (which is currently implemented only in the LegacyValidator child class). Otherwise we won't provide the BC layer

@stof
Copy link
Member

stof commented Jan 26, 2015

The code of the LegacyExecutionContextFactory should also be moved to the code being used. Otherwise we would not be providing a BC layer anymore

@saro0h
Copy link
Contributor

saro0h commented Jan 26, 2015

@stof the LegacyExecutionContextFactory is only used in src/Symfony/Component/Validator/Tests/Validator/LegacyValidatorLegacyApiTest.php and src/Symfony/Component/Validator/Tests/Validator/LegacyValidator2Dot5ApiTest.php. So what do you mean ? Remove the code from here https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php#L64-L73 ?

@stof
Copy link
Member

stof commented Jan 26, 2015

@saro0h no, it was also used in the 2.5-BC API level (which is removed by this PR). And the goal of this PR should be to merge the 2.5-BC level into the 2.5 one, not to remove it. The 2.5 level alone cannot be used in 2.7 by default, because it is a BC break (the 2.5 API level actually is the 3.0 level, i.e. the new API without the BC layers). The goal of bumping the PHP requirement to 5.3.9 was precisely to be able to use the 2.5-bc layer all the time instead of forcing to choose between 2.4 and 2.5 on old PHP versions

@fabpot
Copy link
Member Author

fabpot commented Feb 11, 2015

@stof Can you, by any chance, finish this one?

@stof
Copy link
Member

stof commented Feb 11, 2015

If it can wait until this weekend, yes. I can work on it.

@stof stof self-assigned this Feb 11, 2015
@fabpot
Copy link
Member Author

fabpot commented Feb 11, 2015

@stof I think it can wait a few days, sure. Thanks.

@saro0h
Copy link
Contributor

saro0h commented Feb 22, 2015

Any updates in this one?

@stof
Copy link
Member

stof commented Feb 23, 2015

I haven't worked on it yet (it is still in my TODO list though)

@fabpot
Copy link
Member Author

fabpot commented Mar 14, 2015

@stof Do you think you will have time soon?

@stof
Copy link
Member

stof commented Mar 22, 2015

Closing in favor of #14016

@stof stof closed this Mar 22, 2015
fabpot added a commit that referenced this pull request Mar 23, 2015
…o0h, fabpot, stof)

This PR was merged into the 2.7 branch.

Discussion
----------

  Remove the API version in the validator component

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #13458
| License       | MIT
| Doc PR        | n/a

This completes the work of #13517

Commits
-------

9438206 Complete the removal of API versions in the validator component
75088c0 [Validator] deprecated API version
0c69f69 Removed 2.5 bc layer
@fabpot fabpot deleted the remove-25-bc branch September 7, 2019 12:08
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.

3 participants