-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Translator] Deprecated interface still required for Form #30591
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
Comments
that's a bug in |
see |
I'll take a look. It's then broken in the |
We don't use autowiring/bindings in core so nothing to do there. |
…#30591) (althaus) This PR was merged into the 4.2 branch. Discussion ---------- Fixed usage of TranslatorInterface in form extension (fixes #30591) | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #30591 | License | MIT This PR replaces the fixed usage of the deprecated TranslatorInterface in the form extension with a soft one accepting either the old or the new interface. Commits ------- d8092c7 Fixed usage of TranslatorInterface in form extension (fixes #30591)
* 4.2: [Phpunit] fixed support for PHP 5.3 Response prepare method update [Workflow] Added missing license header Fix case when multiple loaders are providing paths for the same namespace Check if Client exists when test.client does not exist, to provide clearer exception message throw TypeErrors to prepare for type hints in 5.0 [Form] Preventing validation of children if parent with Valid constraint has no validation groups [Form] Added ResetInterface to CachingFactoryDecorator Remove deprecated usage [Tests] fixed compatbility of assertEquals(): void Fixed usage of TranslatorInterface in form extension (fixes #30591) [Intl][4.2] Fix test [Intl] Fix test [Validator] Add the missing translations for the Arabic (ar) locale [Intl] Add compile binary Fix DebugCommand when chain loader is involved [Form] Fixed some phpdocs
Symfony version(s) affected: 4.2.x
Description
According to the current docs the
Symfony\Component\Translation\TranslatorInterface
has been superseded by theSymfony\Contracts\Translation\TranslatorInterface
. I've updated our custom GettextTranslator and dropped the deprecated interface.This leads to an exception in the form handling:
How to reproduce
See above. Use a custom Translator and only implement the new interface(s).
Possible Solution
I'm not sure how Symfony exactly handles an interface exchange, but it smells like the doc should be improved stating that the old interface is still required in combination with the form/validator? Otherwise the
TransformationFailureExtension
could be improved to accept both interfaces? Currently the upgrade doc reads like "just replace the interface".Cheers
Matthias
The text was updated successfully, but these errors were encountered: