Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
…tory $validators argument
chalasr commentedMay 24, 2017
I thought we would fully avoid storing instances from the container (i.e. remove the |
ogizanagi commentedMay 24, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. BTW,this makes me think this implementation can be moved to the EDIT: The PSR-11 specifies:
WDYT? |
chalasr commentedMay 24, 2017
fair enough to me! |
ogizanagi commentedMay 25, 2017 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
See#22905 about moving the class in the component (and keeping only one deprecation rather than the current three in 3.3) |
…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
ogizanagi commentedMay 26, 2017
On hold (waiting for 3.3 branch to be merged in upper branches to get#22905). |
chalasr commentedMay 27, 2017
This can be closed |
Uh oh!
There was an error while loading.Please reload this page.
Follows#22905