[ThemeBundle] Remove deprecated translator selector usage#9277
[ThemeBundle] Remove deprecated translator selector usage#9277adrienlucas wants to merge 1 commit intoSylius:1.1from
Conversation
fe58d19 to
088eda2
Compare
| $messageFormatter = new class implements MessageFormatterInterface { | ||
| public function format($message, $locale, array $parameters = array()) | ||
| { | ||
| return strtr($message, $parameters); |
There was a problem hiding this comment.
This can even be simplified to return $message;
|
I believe it should be open to 1.0. |
|
@lchrusciel it seems that the 1.0 version require |
|
You are right. It should be opened to 1.1 |
088eda2 to
13f94dd
Compare
|
@lchrusciel done ! Edit : and also squashed btw ! |
| public function __construct( | ||
| TranslatorLoaderProviderInterface $loaderProvider, | ||
| TranslatorResourceProviderInterface $resourceProvider, | ||
| MessageSelector $messageSelector, |
There was a problem hiding this comment.
🚨 BC break alert 🚨
The way we can solve it here is to remove the typehint and do instanceof checks inside to accept MessageSelector|MessageFormatterInterface. We'll also need tests which use both of them.
|
Thanks for the effort to make this PR! In my opinion, it should go to 1.2 (master) as it isn't a bugfix but a deprecation removal (and I'd like to keep bugfix branches changes as small as possible). |
See https://github.com/symfony/symfony/blob/b9a2e21326ad93aab1350e566afced701942ac6d/src/Symfony/Component/Translation/Translator.php#L90