diff --git a/src/Exceptions/CannotCreateDbDumper.php b/src/Exceptions/CannotCreateDbDumper.php index 7d6937bd..dca0e6bf 100644 --- a/src/Exceptions/CannotCreateDbDumper.php +++ b/src/Exceptions/CannotCreateDbDumper.php @@ -8,6 +8,12 @@ class CannotCreateDbDumper extends Exception { public static function unsupportedDriver(string $driver): self { - return new static("Cannot create a dumper for db driver `{$driver}`. Use `mysql`, `pgsql`, `mongodb` or `sqlite`."); + $supportedDrivers = collect(config("database.connections"))->keys(); + + $formattedSupportedDrivers = $supportedDrivers + ->map(fn (string $supportedDriver) => "`$supportedDriver`") + ->join(glue: ', ', finalGlue: ' or '); + + return new static("Cannot create a dumper for db driver `{$driver}`. Use {$formattedSupportedDrivers}."); } } diff --git a/src/Exceptions/InvalidConfiguration.php b/src/Exceptions/InvalidConfiguration.php deleted file mode 100644 index 037ccad6..00000000 --- a/src/Exceptions/InvalidConfiguration.php +++ /dev/null @@ -1,13 +0,0 @@ -