Skip to content

Commit fa583d2

Browse files
committed
Adding compatibility with Laravel 8.x
1 parent f4e51d8 commit fa583d2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Database/Connector.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ public function connect(array $config)
1212

1313
$connection = $this->createConnection($this->getDsn($config), $config, $options);
1414

15-
if(array_key_exists('charset', $config) && $config['charset'] != '') {
15+
if(isset($config['charset'])) {
1616
$connection->prepare("set char_convert '{$config['charset']}'")->execute();
1717
}
1818

19-
$this->configureIsolationLevel($connection, $config);
19+
if (isset($config['isolation_level'])) {
20+
$connection->prepare(
21+
"SET TRANSACTION ISOLATION LEVEL {$config['isolation_level']}"
22+
)->execute();
23+
}
2024

2125
return $connection;
2226
}

0 commit comments

Comments
 (0)