Skip to content

Commit e163072

Browse files
committed
Merge branch 'fix-migration-and-serverVersion' of https://github.com/tonysm/framework into tonysm-fix-migration-and-serverVersion
2 parents effec60 + 8de4eb9 commit e163072

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/Illuminate/Database/Connection.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -897,11 +897,15 @@ public function getDoctrineConnection()
897897
if (is_null($this->doctrineConnection)) {
898898
$driver = $this->getDoctrineDriver();
899899

900-
$this->doctrineConnection = new DoctrineConnection([
900+
$this->doctrineConnection = new DoctrineConnection(array_filter([
901901
'pdo' => $this->getPdo(),
902902
'dbname' => $this->getConfig('database'),
903903
'driver' => $driver->getName(),
904-
], $driver);
904+
// One can manually pass the serverVersion config to the database connection
905+
// options. This is used by Doctrine instead of going through the regular
906+
// regular platform version detection. This config was not being used.
907+
'serverVersion' => $this->getConfig('serverVersion'),
908+
]), $driver);
905909
}
906910

907911
return $this->doctrineConnection;

0 commit comments

Comments
 (0)