Skip to content

Commit

Permalink
Merge branch 'fix-migration-and-serverVersion' of https://github.com/…
Browse files Browse the repository at this point in the history
…tonysm/framework into tonysm-fix-migration-and-serverVersion
  • Loading branch information
taylorotwell committed Jun 27, 2019
2 parents effec60 + 8de4eb9 commit e163072
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Illuminate/Database/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -897,11 +897,15 @@ public function getDoctrineConnection()
if (is_null($this->doctrineConnection)) {
$driver = $this->getDoctrineDriver();

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

return $this->doctrineConnection;
Expand Down

0 comments on commit e163072

Please sign in to comment.