liip / LiipTestFixturesBundle

This bundles enables efficient loading of Doctrine fixtures in functional test-cases for Symfony applications
https://liip.ch
MIT License
165 stars 45 forks source link

SqlitePlatform::getName() is deprecated #253

Closed craigh closed 8 months ago

craigh commented 9 months ago

I get this deprecation notice when running my tests:

SqlitePlatform::getName() is deprecated. Identify platforms by their class. (SqlitePlatform.php:672 called by AbstractDatabaseTool.php:196, https://github.com/doctrine/dbal/issues/4749, package doctrine/dbal)

That's \Liip\TestFixturesBundle\Services\DatabaseTools\AbstractDatabaseTool

I was hoping you could help with that. thank you :-)

Symfony 6.3.9 doctrine/doctrine-bundle 2.11.1 doctrine/orm 2.17.1 phpunit/phpunit 9.6.15 liip/functional-test-bundle 4.10.0 liip/test-fixtures-bundle 2.7.0

let me know if you need other info. thank you

alexislefebvre commented 9 months ago

Do you have an idea about how to do this?

Identify platforms by their class.

craigh commented 9 months ago

not really. Someone on slack said "use SqlitePlaform::class" but I wouldn't know where or how.

mbabker commented 9 months ago

Duplicate of #184 😉

For reference though, what you probably need is something like this method in the symfony/cache DBAL adapter which effectively replicates the deprecated getName() method for known platforms.

alexislefebvre commented 8 months ago

Thanks @mbabker, let's close it and follow this subject in the other issue: