Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update Callback.rst#4161

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
lashae wants to merge1 commit intosymfony:2.5fromlashae:patch-1
Closed

Update Callback.rst#4161

lashae wants to merge1 commit intosymfony:2.5fromlashae:patch-1

Conversation

@lashae
Copy link
Contributor

"Symfony\Component\Validator\ExecutionContextInterface" namespace is deprecated, new namespace should be "Symfony\Component\Validator\Context\ExecutionContextInterface"

"Symfony\Component\Validator\ExecutionContextInterface" namespace is deprecated, new namespace should be "Symfony\Component\Validator\Context\ExecutionContextInterface"
@stof
Copy link
Member

If you typehint the new interface instead of its deprecated parent, you make your bundle incompatible with the 2.4 API. So there should at least be a note sayign that any shared bundle should typehint the interface compatible with all versions of the API. Doing such change is safe only when you control the API version to force it being 2.5 or 2.5-bc

@lashae
Copy link
ContributorAuthor

@stof This page belongs to documentation of version 2.5 (v2.4 has a seperate documentation), so do you really think that it is necessary to explicitly mention the issue you talk about?

@stof
Copy link
Member

@lashae even in Symfony 2.5, the Validator API version 2.4 is not gone. It will only disappear in 3.0.

I suggest you to read the discussion in#4105

@weaverryan
Copy link
Member

My vote is to use the non-deprecated class, and then add (which we've talked about before but haven't done yet) a cookbook entry for third-party bundle authors about doing some extra things to keep compatibility. The multiple API's is kind of a pain in the butt, so I want to hide that pain from the end user (at the expense of the more-advanced OS bundle authors).

@lashae
Copy link
ContributorAuthor

I agree with@weaverryan, deprecation period should also give us the chance to update the docs.

@weaverryan
Copy link
Member

Hey@lashae!

I've taken your commit and moved it to#4233 so we can summarize all the changes. Thanks for starting this! I'll close this PR.

weaverryan added a commit that referenced this pull requestOct 18, 2014
…, weaverryan)This PR was merged into the 2.5 branch.Discussion----------2.5 Validation API changes| Q             | A| ------------- | ---| Doc fix?      | no| New docs?     | yes| Applies to    | 2.5| Fixed tickets |#4094Hi guys!This takes the work in#4056,#4105 and#4161 and extends it based on some feedback. Basically, the whole validation stuff is quite difficult, because:A) We want to show the non-deprecated methods so people use the new stuffB) We don't want to confuse users on the 2.4 API (even though this number of users should be very small, as it would require you to have started a project in the past and be using 5.3.9 and lower#4105 (comment))This solution is to show the new way, but always show the old way in comments. This would check of A and B in#4094.Thanks!Commits-------9874d8e [#4233][#4094] Making validateValue and validate changes94fc520 Minor tweaks and a missing location thanks to xabbuh and WouterJf97ba7a Fixes thanks to@xabbuh279d8d6 Adding a section about keeping BC in a re-usable bundle280440e Adding details about the 2.4 API as commentse658b56 added a versionadded comment to Callback.rst70c5ca1 Update custom_contraint.rst to meet the new 2.5 api5dfe499 Don't use deprecated functions in Callback.rstf4380ed Update Callback.rst042dcf9 Replace addViolationAt (deprecated) by buildViolation
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@lashae@stof@weaverryan@wouterj

[8]ページ先頭

©2009-2025 Movatter.jp