Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c1da2be

Browse files
committed
minor symfony#60364 [Cache] choose the correctly cased class name for the SQLite platform (xabbuh)
This PR was merged into the 7.3 branch. Discussion ---------- [Cache] choose the correctly cased class name for the SQLite platform | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT this was missed in symfony#60159 Commits ------- 41ea779 choose the correctly cased class name for the SQLite platform
2 parents 57d4f08 + 41ea779 commit c1da2be

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/Symfony/Component/Cache/Adapter/DoctrineDbalAdapter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,16 @@ private function getPlatformName(): string
359359

360360
$platform = $this->conn->getDatabasePlatform();
361361

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+
362369
return $this->platformName = match (true) {
363370
$platform instanceof \Doctrine\DBAL\Platforms\AbstractMySQLPlatform => 'mysql',
364-
$platform instanceof \Doctrine\DBAL\Platforms\SqlitePlatform => 'sqlite',
371+
$platform instanceof $sqlitePlatformClass => 'sqlite',
365372
$platform instanceof \Doctrine\DBAL\Platforms\PostgreSQLPlatform => 'pgsql',
366373
$platform instanceof \Doctrine\DBAL\Platforms\OraclePlatform => 'oci',
367374
$platform instanceof \Doctrine\DBAL\Platforms\SQLServerPlatform => 'sqlsrv',

0 commit comments

Comments
 (0)