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

Revert "Fix interface in constructor ImportTranslationsCommand" #404

Closed Heyden7611 closed 2 years ago

Heyden7611 commented 2 years ago

Reverts lexik/LexikTranslationBundle#396

Revert because add interface is not useful

https://github.com/lexik/LexikTranslationBundle/pull/396#issuecomment-984351633

bartmcleod commented 2 years ago

@Heyden7611 Can you elaborate on why it is not useful and if it is not, why does your PR not also delete the interface itself?

Heyden7611 commented 2 years ago

@bartmcleod

⚠️ When we overload lexik_translation.locale.manager.class, we have an error when launching the commandlexik: translation: import

 Lexik\Bundle\TranslationBundle\Command\ImportTranslationsCommand::__constru  
  ct(): Argument #2 ($localeManager) must be of type Lexik\Bundle\Translation  
  Bundle\Manager\LocaleManager, App\Provider\LocaleProvider given, called in   
  /var/www/var/cache/dev/ContainerYlsDUZy/getImportTranslationsCommandService  
  .php on line 23 
bartmcleod commented 2 years ago

This error is on your side I think, you should not configure it to use a App\Provider\LocaleProvider, like the message says. At least, that is what I read in the error message.

Also, the interface was added by someone who had a use for it, so we cannot delete it anymore. It would be a BC break to do so.