59fad59886
This PR was merged into the 4.2-dev branch.
Discussion
----------
[Contracts] Add Translation\TranslatorInterface + decouple symfony/validator from symfony/translation
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | yes
| Tests pass? | yes
| Fixed tickets | #15714, #18930
| License | MIT
| Doc PR | -
Let's decouple Validator from Translation component \o/!
TODO:
- [x] add `TranslatorInterface`, deprecate it from Translation
- [x] add `TranslatorTrait`, deprecating `MessageSelector`, `Internal` and `PluralizationRules`
- [x] deprecate `ValidatorBuilderInterface(LegacyTranslatorInterface)`
- [x] inject a new `identity_translator` into `translator.formatter.default`, deprecate `translator.selector`
- [x] copy tests in the Contracts namespace to ensure the `TranslatorTrait` behaves properly
- [x] figure out a way to keep throwing `InvalidArgumentException` from the component
- [x] update UPGRADING and CHANGELOG files
- [x] polish the deprecation layer (ensure all needed runtime deprecations are here)
Reviews welcome already.
Commits
-------
|
||
---|---|---|
.. | ||
AbstractPhpFileCacheWarmer.php | ||
AnnotationsCacheWarmer.php | ||
RouterCacheWarmer.php | ||
SerializerCacheWarmer.php | ||
TemplateFinder.php | ||
TemplateFinderInterface.php | ||
TemplatePathsCacheWarmer.php | ||
TranslationsCacheWarmer.php | ||
ValidatorCacheWarmer.php |