Skip to content

Commit b2a5cd8

Browse files
committed
fix doctrine connection factory
see: doctrine/dbal#3548
1 parent 61bc972 commit b2a5cd8

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

src/Illuminate/Database/Connection.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,9 +840,14 @@ public function getDoctrineConnection()
840840
{
841841
$driver = $this->getDoctrineDriver();
842842

843-
$data = array('pdo' => $this->pdo, 'dbname' => $this->getConfig('database'));
844-
845-
return new DoctrineConnection($data, $driver);
843+
return new DoctrineConnection([
844+
'host' => $this->getConfig('host'),
845+
'port' => $this->getConfig('port'),
846+
'user' => $this->getConfig('username'),
847+
'password' => $this->getConfig('password'),
848+
'dbname' => $this->getDatabaseName(),
849+
'charset' => $this->getConfig('charset'),
850+
], $driver);
846851
}
847852

848853
/**

0 commit comments

Comments
 (0)