Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Validator] Deprecated interface still required for TranslationInterface in Validator#31025
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
[Validator] Deprecated interface still required for TranslationInterface in Validator#31025
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Uh oh!
There was an error while loading.Please reload this page.
| * {@inheritdoc} | ||
| */ | ||
| publicfunctionsetTranslator(LegacyTranslatorInterface$translator) | ||
| publicfunctionsetTranslator($translator) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Changing this is a BC break - but that might be OK as maybe nobody extends this class.
If not, we need to rethink the BC layer.
d247e67 to4301a56Comparesnebes commentedApr 8, 2019
Accidentally closed this one |
nicolas-grekas commentedApr 10, 2019
Thinking twice, this change is wrong - as in "BC break". |
stof commentedApr 12, 2019
but then, we need to update FrameworkBundle to perform this wrapping. Otherwise, we force the |
stof commentedApr 12, 2019
btw, this also means we don't have a migration path on the ValidatorBuilder for now. |
nicolas-grekas commentedApr 12, 2019
we have one: the class is made final |
…or with LegacyTranslatorProxy (nicolas-grekas)This PR was merged into the 4.2 branch.Discussion----------[FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy| Q | A| ------------- | ---| Branch? | 4.2| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#31092,#31025| License | MIT| Doc PR | -This allows defining a translator that implements only the new interface and use it with ValidatorBuilder.ping@dvdknaap,@snebes since you were affected.Commits-------a12656e [FrameworkBundle] decorate the ValidatorBuilder's translator with LegacyTranslatorProxy
This PR removes the hard requirement for the LegacyValidatorInterface used by replacing the type-hint with a docBlock typehint for either the non-deprecated or deprecated TranslatorInterface.
Also, updated the test to use the new TranslatorInterface contract.