Skip to content

Commit

Permalink
chore: remove support for non-MySQL drivers
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Sep 20, 2024
1 parent a8b7b3f commit b89fe79
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
3 changes: 0 additions & 3 deletions src/DatabaseDumpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ private function getDoctrineConnection(): DoctrineConnection

$driver = match ($driverName = $connection->getDriverName()) {
'mysql', 'mariadb' => SupportedDriver::MySQL,
'pgsql', 'postgres' => SupportedDriver::PostgreSQL,
'sqlite' => SupportedDriver::SQLite,
'sqlsrv' => SupportedDriver::SqlServer,
default => throw new RuntimeException("Unsupported database driver provided ({$driverName})."),
};

Expand Down
18 changes: 0 additions & 18 deletions src/Enums/SupportedDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
enum SupportedDriver
{
case MySQL;
case PostgreSQL;
case SQLite;
case SqlServer;

public function driverName(): string
{
return match ($this) {
self::MySQL => 'pdo_mysql',
self::PostgreSQL => 'pdo_pgsql',
self::SQLite => 'pdo_sqlite',
self::SqlServer => 'pdo_sqlsrv',
};
}

Expand All @@ -31,18 +25,6 @@ public function driver(): Driver
{
use ConnectsToDatabase;
},
self::PostgreSQL => new class extends Driver\AbstractPostgreSQLDriver
{
use ConnectsToDatabase;
},
self::SQLite => new class extends Driver\AbstractSQLiteDriver
{
use ConnectsToDatabase;
},
self::SqlServer => new class extends Driver\AbstractSQLServerDriver
{
use ConnectsToDatabase;
},
};
}
}

0 comments on commit b89fe79

Please sign in to comment.