File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 7
7
use Illuminate \Database \Query \Processors \MySqlProcessor ;
8
8
use Illuminate \Database \Schema \Grammars \MySqlGrammar as SchemaGrammar ;
9
9
use Illuminate \Database \Schema \MySqlBuilder ;
10
+ use LogicException ;
10
11
11
12
class MySqlConnection extends Connection
12
13
{
@@ -61,6 +62,12 @@ protected function getDefaultPostProcessor()
61
62
*/
62
63
protected function getDoctrineDriver ()
63
64
{
65
+ if (! class_exists (DoctrineDriver::class)) {
66
+ throw new LogicException (
67
+ 'Laravel v6 is only compatible with doctrine/dbal 2, in order to use this feature you must require the package "doctrine/dbal:^2.6". '
68
+ );
69
+ }
70
+
64
71
return new DoctrineDriver ;
65
72
}
66
73
}
Original file line number Diff line number Diff line change 7
7
use Illuminate \Database \Query \Processors \PostgresProcessor ;
8
8
use Illuminate \Database \Schema \Grammars \PostgresGrammar as SchemaGrammar ;
9
9
use Illuminate \Database \Schema \PostgresBuilder ;
10
+ use LogicException ;
10
11
11
12
class PostgresConnection extends Connection
12
13
{
@@ -61,6 +62,12 @@ protected function getDefaultPostProcessor()
61
62
*/
62
63
protected function getDoctrineDriver ()
63
64
{
65
+ if (! class_exists (DoctrineDriver::class)) {
66
+ throw new LogicException (
67
+ 'Laravel v6 is only compatible with doctrine/dbal 2, in order to use this feature you must require the package "doctrine/dbal:^2.6". '
68
+ );
69
+ }
70
+
64
71
return new DoctrineDriver ;
65
72
}
66
73
}
Original file line number Diff line number Diff line change 7
7
use Illuminate \Database \Query \Processors \SQLiteProcessor ;
8
8
use Illuminate \Database \Schema \Grammars \SQLiteGrammar as SchemaGrammar ;
9
9
use Illuminate \Database \Schema \SQLiteBuilder ;
10
+ use LogicException ;
10
11
11
12
class SQLiteConnection extends Connection
12
13
{
@@ -85,6 +86,12 @@ protected function getDefaultPostProcessor()
85
86
*/
86
87
protected function getDoctrineDriver ()
87
88
{
89
+ if (! class_exists (DoctrineDriver::class)) {
90
+ throw new LogicException (
91
+ 'Laravel v6 is only compatible with doctrine/dbal 2, in order to use this feature you must require the package "doctrine/dbal:^2.6". '
92
+ );
93
+ }
94
+
88
95
return new DoctrineDriver ;
89
96
}
90
97
Original file line number Diff line number Diff line change 9
9
use Illuminate \Database \Query \Processors \SqlServerProcessor ;
10
10
use Illuminate \Database \Schema \Grammars \SqlServerGrammar as SchemaGrammar ;
11
11
use Illuminate \Database \Schema \SqlServerBuilder ;
12
+ use LogicException ;
12
13
use Throwable ;
13
14
14
15
class SqlServerConnection extends Connection
@@ -108,6 +109,12 @@ protected function getDefaultPostProcessor()
108
109
*/
109
110
protected function getDoctrineDriver ()
110
111
{
112
+ if (! class_exists (DoctrineDriver::class)) {
113
+ throw new LogicException (
114
+ 'Laravel v6 is only compatible with doctrine/dbal 2, in order to use this feature you must require the package "doctrine/dbal:^2.6". '
115
+ );
116
+ }
117
+
111
118
return new DoctrineDriver ;
112
119
}
113
120
}
You can’t perform that action at this time.
0 commit comments