From cb1bbf27429fd9cd40a03eab83388257ca5c5f87 Mon Sep 17 00:00:00 2001 From: Mykhailo Sulyma Date: Mon, 3 Oct 2022 15:31:37 +0300 Subject: [PATCH] Use Platform type instead of Driver in DoctrineDataLoader --- Loader/DoctrineDataLoader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Loader/DoctrineDataLoader.php b/Loader/DoctrineDataLoader.php index 3ac3577..24d4c2d 100644 --- a/Loader/DoctrineDataLoader.php +++ b/Loader/DoctrineDataLoader.php @@ -3,7 +3,7 @@ namespace Javer\SphinxBundle\Loader; use Doctrine\DBAL\Connection; -use Doctrine\DBAL\Driver\PDO\SQLite\Driver as SqliteDriver; +use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Result; use Javer\SphinxBundle\Sphinx\Manager; use Javer\SphinxBundle\Sphinx\Query; @@ -179,7 +179,7 @@ protected function executeDatabaseQuery(string $query): Result protected function adaptQuery(string $query): string { - if ($this->database->getDriver() instanceof SqliteDriver) { + if ($this->database->getDatabasePlatform() instanceof SqlitePlatform) { $query = preg_replace("/UNIX_TIMESTAMP\(/i", "strftime('%s', ", $query); }