Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c4b217b

Browse filesBrowse files
committed
choose the correctly cased class name for the SQLite platform
1 parent ab54d0c commit c4b217b
Copy full SHA for c4b217b

File tree

Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-1
lines changed

‎Adapter/DoctrineDbalAdapter.php

Copy file name to clipboardExpand all lines: Adapter/DoctrineDbalAdapter.php
+8-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.