Skip to content

Commit

Permalink
fixup! Manually map DB platform to string for DBAL 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaswolf committed Nov 21, 2024
1 parent 8e96099 commit 4aa5d77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Service/PlatformName.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ public static function getNameForPlatform(AbstractPlatform $databasePlatform): s
if ($databasePlatform instanceof PostgreSQLPlatform) {
return 'postgresql';
}
if ($databasePlatform instanceof SQLitePlatform) {
if (class_exists( SQLitePlatform::class) && $databasePlatform instanceof SQLitePlatform) {
return 'sqlite';
}
if (class_exists( SqlitePlatform::class) && $databasePlatform instanceof SqlitePlatform) {
return 'sqlite';
}
throw new \RuntimeException(sprintf('Unsupported platform %s', get_class($databasePlatform)), 1732200673);
Expand Down

0 comments on commit 4aa5d77

Please sign in to comment.