Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d1bbcb8

Browse files
committedMar 15, 2021
allow any override
1 parent c31e809 commit d1bbcb8

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed
 

‎ConnectionFactory.php

+1-19
Original file line numberDiff line numberDiff line change
@@ -65,27 +65,9 @@ public function createConnection(array $params, Configuration $config = null, Ev
6565
}
6666

6767
$connection = DriverManager::getConnection($params, $config, $eventManager);
68-
$params = $connection->getParams();
68+
$params = array_merge($connection->getParams(), $connectionOverrideOptions);
6969
$driver = $connection->getDriver();
7070

71-
if (! empty($connectionOverrideOptions)) {
72-
$supportedOverrideParams = [
73-
'dbname',
74-
'host',
75-
'port',
76-
'user',
77-
'password',
78-
];
79-
80-
foreach ($supportedOverrideParams as $paramKey) {
81-
if (! array_key_exists($paramKey, $connectionOverrideOptions)) {
82-
continue;
83-
}
84-
85-
$params[$paramKey] = $connectionOverrideOptions[$paramKey];
86-
}
87-
}
88-
8971
if ($driver instanceof AbstractMySQLDriver) {
9072
$params['charset'] = 'utf8mb4';
9173

0 commit comments

Comments
 (0)
Please sign in to comment.