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

Incompatibility with doctrine/dbal #402

Closed andriusvo closed 2 years ago

andriusvo commented 2 years ago

Hello,

In Lexik\Bundle\TranslationBundle\Storage\DoctrineORMStorage there is a method getDriver()->getName(). getName() method is deprecated in doctrine/dbal package and is not compatible with 3.0 version of doctrine/dbal. BC break described here: https://github.com/doctrine/dbal/blob/3.1.x/UPGRADE.md

knallcharge commented 2 years ago

The upgrade-document suggests "For referencing the driver, use its class name.", I have created a pull request that does just that and works with both dbal 2 and 3, please check.

bartmcleod commented 2 years ago

@Knallcharge please use instanceof instead of get_class

knallcharge commented 2 years ago

Updated my pull-request.