lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
422 stars 259 forks source link

Fix alias and override #405

Closed Heyden7611 closed 2 years ago

Heyden7611 commented 2 years ago

Currently when we install lexik / LexikTranslationBundle.

Cannot autowire service "Lexik\Bundle\TranslationBundle\Command\ImportTrans  
!!    lationsCommand": argument "$localeManager" of method "__construct()" refere  
!!    nces interface "Lexik\Bundle\TranslationBundle\Manager\LocaleManagerInterfa  
!!    ce" but no such service exists. You should maybe alias this interface to th  
!!    e existing "Lexik\Bundle\TranslationBundle\Manager\LocaleManager" service. 

To correct the LocaleManager overload problem, you must:

Exemple for multiple implementations : https://symfony.com/doc/5.4/service_container/autowiring.html#dealing-with-multiple-implementations-of-the-same-type

After update with fix

Capture d’écran 2021-12-02 à 13 44 38

Debug - https://github.com/lexik/LexikTranslationBundle/pull/396