简体   繁体   中英

removed MessageSelector in Symfony/Component/Translation

I just tried to upgrade to Symfony 5.0, however, I get the following error:

You have requested a non-existent service "translator.selector".

In my code in services.yaml I have

Symfony\Component\Translation\MessageSelector: '@translator.selector'

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Translation/CHANGELOG.md I saw that it was removed. How should I continue? Thanks in advance!

Best way is to check the Changelog https://github.com/symfony/symfony/blob/master/UPGRADE-5.0.md

The MessageSelector, Interval and PluralizationRules classes have been removed, use IdentityTranslator instead

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM