diff --git a/src/Illuminate/Database/SQLiteConnection.php b/src/Illuminate/Database/SQLiteConnection.php index 4990fdd299a1..ba64518f037f 100755 --- a/src/Illuminate/Database/SQLiteConnection.php +++ b/src/Illuminate/Database/SQLiteConnection.php @@ -7,6 +7,7 @@ use Illuminate\Database\Query\Processors\SQLiteProcessor; use Illuminate\Database\Schema\Grammars\SQLiteGrammar as SchemaGrammar; use Illuminate\Database\Schema\SQLiteBuilder; +use LogicException; class SQLiteConnection extends Connection { @@ -85,6 +86,12 @@ protected function getDefaultPostProcessor() */ protected function getDoctrineDriver() { + if (! class_exists(DoctrineDriver::class)) { + throw new LogicException( + 'Laravel v6 is only compatible with doctrine/dbal 2, lock it to that version with composer require doctrine/dbal "^2.0"' + ); + } + return new DoctrineDriver; }