File tree 1 file changed +8
-1
lines changed
src/Symfony/Component/Cache/Adapter
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -359,9 +359,16 @@ private function getPlatformName(): string
359
359
360
360
$ platform = $ this ->conn ->getDatabasePlatform ();
361
361
362
+ if (interface_exists (DBALException::class)) {
363
+ // DBAL 4+
364
+ $ sqlitePlatformClass = 'Doctrine\DBAL\Platforms\SQLitePlatform ' ;
365
+ } else {
366
+ $ sqlitePlatformClass = 'Doctrine\DBAL\Platforms\SqlitePlatform ' ;
367
+ }
368
+
362
369
return $ this ->platformName = match (true ) {
363
370
$ platform instanceof \Doctrine \DBAL \Platforms \AbstractMySQLPlatform => 'mysql ' ,
364
- $ platform instanceof \ Doctrine \ DBAL \ Platforms \SqlitePlatform => 'sqlite ' ,
371
+ $ platform instanceof $ sqlitePlatformClass => 'sqlite ' ,
365
372
$ platform instanceof \Doctrine \DBAL \Platforms \PostgreSQLPlatform => 'pgsql ' ,
366
373
$ platform instanceof \Doctrine \DBAL \Platforms \OraclePlatform => 'oci ' ,
367
374
$ platform instanceof \Doctrine \DBAL \Platforms \SQLServerPlatform => 'sqlsrv ' ,
You can’t perform that action at this time.
0 commit comments