lexik / LexikTranslationBundle

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

Fix deprecations raised for support of Doctrine DBAL 4 #442

Closed raziel057 closed 11 months ago

raziel057 commented 11 months ago

Fix for the following deprecation:

Not configuring a schema manager factory is deprecated. Use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory which is going to be the default in DBAL 4. (Connection.php:220 called by DriverManager.php:196, https://github.com/doctrine/dbal/issues/5812, package doctrine/dbal) Stack trace:

0 [internal function]: Symfony\Bridge\PhpUnit\DeprecationErrorHandler->handleError(16384, 'Not configuring...', 'X:\workspace-no...', 209)

1 vendor\doctrine\dbal\src\Connection.php(220): Doctrine\Deprecations\Deprecation::trigger('doctrine/dbal', 'https://github....', 'Not configuring...', 'Doctrine\DBAL\S...')

2 vendor\doctrine\dbal\src\DriverManager.php(196): Doctrine\DBAL\Connection->__construct(Object(SensitiveParameterValue), Object(Doctrine\DBAL\Driver\PDO\MySQL\Driver), Object(Doctrine\DBAL\Configuration), Object(Doctrine\Common\EventManager))

3 vendor\lexik\translation-bundle\Storage\DoctrineORMStorage.php(39): Doctrine\DBAL\DriverManager::getConnection(Object(SensitiveParameterValue))

4 vendor\lexik\translation-bundle\EventDispatcher\GetDatabaseResourcesListener.php(25): Lexik\Bundle\TranslationBundle\Storage\DoctrineORMStorage->translationsTablesExist()

And

Connection::getSchemaManager() is deprecated, use Connection::createSchemaManager() instead. (Connection.php:1695 called by DoctrineORMStorage.php:57, https://github.com/doctrine/dbal/issues/4515, package doctrine/dbal)