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

[FrameworkBundle][Validator] Remove deprecated ConstraintValidatorFactory#22887

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
ogizanagi wants to merge1 commit intosymfony:masterfromogizanagi:rm_deprec/fwb_validator
Closed

[FrameworkBundle][Validator] Remove deprecated ConstraintValidatorFactory#22887

ogizanagi wants to merge1 commit intosymfony:masterfromogizanagi:rm_deprec/fwb_validator

Conversation

@ogizanagi
Copy link
Contributor

@ogizanagiogizanagi commentedMay 24, 2017
edited
Loading

QA
Branch?master
Bug fix?no
New feature?no
BC breaks?yes
Deprecations?no
Tests pass?yes
Fixed tickets#22905
LicenseMIT
Doc PRN/A

Follows#22905

@chalasr
Copy link
Member

I thought we would fully avoid storing instances from the container (i.e. remove the$validators property). Is there much interest to keep it? We did remove a similar one from the ServiceLocator class in#22029

@ogizanagi
Copy link
ContributorAuthor

ogizanagi commentedMay 24, 2017
edited
Loading

I think keeping this internal cache is cheap and still worth it, but no strong opinion on this.

#22029 was motivated by the fact the memoization was useless when used with the symfony DI container and prevents from using properly non-shared services.
This one can be used with any PSR-11 implementation, which may or may not cache instances (unless it's specified as a PSR-11 requirement?) and we also create instances on the fly.

BTW,this makes me think this implementation can be moved to theValidator component instead of keeping it in theFrameworkBundle, as anyone should be able to use thisContainerConstraintValidatorFactory without using the framework bundle.

EDIT: The PSR-11 specifies:

Two successive calls to get with the same identifier SHOULD return the same value. However, depending on the implementor design and/or user configuration, different values might be returned, so user SHOULD NOT rely on getting the same value on 2 successive calls.

WDYT?

@chalasr
Copy link
Member

and we also create instances on the fly.

fair enough to me!

@ogizanagi
Copy link
ContributorAuthor

ogizanagi commentedMay 25, 2017
edited
Loading

See#22905 about moving the class in the component (and keeping only one deprecation rather than the current three in 3.3)

stof added a commit that referenced this pull requestMay 26, 2017
…o the component (ogizanagi)This PR was merged into the 3.3 branch.Discussion----------[FrameworkBundle][Validator] Move the PSR-11 factory to the component| Q             | A| ------------- | ---| Branch?       | 3.3 <!-- see comment below -->| Bug fix?      | no| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->| BC breaks?    | no| Deprecations? | yes <!-- don't forget updating UPGRADE-*.md files -->| Tests pass?   | yes| Fixed tickets |#22887 (comment) <!-- #-prefixed issue number(s), if any -->| License       | MIT| Doc PR        | N/AInstead of the 3 following deprecations: * The `ConstraintValidatorFactory::$validators` and `$container` properties   have been deprecated and will be removed in 4.0. * Extending `ConstraintValidatorFactory` is deprecated and won't be supported in 4.0.* Passing an array of validators or validator aliases as the second argument of   `ConstraintValidatorFactory::__construct()` is deprecated since 3.3 and will   be removed in 4.0. Use the service locator instead.I'd suggest simply deprecating the FrameworkBundle's class in favor of using a new `ContainerConstraintValidatorFactory`. To me, there is no reason anyone using the validator component without the framework bundle cannot use this PSR-11 compliant implementation, nor I see a reason to make it final.Commits-------68c1917 [FrameworkBundle][Validator] Move the PSR-11 factory to the component
@ogizanagiogizanagi changed the title[FrameworkBundle][Validator] Remove deprecated ConstraintValidatorFactory $validators argument[FrameworkBundle][Validator] Remove deprecated ConstraintValidatorFactoryMay 26, 2017
@ogizanagi
Copy link
ContributorAuthor

On hold (waiting for 3.3 branch to be merged in upper branches to get#22905).

@chalasr
Copy link
Member

This can be closed

@ogizanagiogizanagi deleted the rm_deprec/fwb_validator branchMay 27, 2017 14:21
@ogizanagi
Copy link
ContributorAuthor

@chalasr : Not exactly, as the changelog is still missing an update. That's why I kept this opened in case it was not entirely done during the merge. Anyway, see#22926 then :)

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

4.0

Development

Successfully merging this pull request may close these issues.

5 participants

@ogizanagi@chalasr@nicolas-grekas@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp