mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 17:52:02 -04:00
fix(db): Remove usage of dropped doctrine event manager
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
6d0e8e4606
commit
76ef7dd71e
1 changed files with 5 additions and 5 deletions
|
|
@ -103,8 +103,8 @@ class ConnectionFactory {
|
|||
*/
|
||||
public function getConnection($type, $additionalConnectionParams) {
|
||||
$normalizedType = $this->normalizeType($type);
|
||||
$eventManager = new EventManager();
|
||||
$eventManager->addEventSubscriber(new SetTransactionIsolationLevel());
|
||||
// FIXME $eventManager = new EventManager();
|
||||
// FIXME $eventManager->addEventSubscriber(new SetTransactionIsolationLevel());
|
||||
$additionalConnectionParams = array_merge($this->createConnectionParams(), $additionalConnectionParams);
|
||||
switch ($normalizedType) {
|
||||
case 'pgsql':
|
||||
|
|
@ -117,7 +117,7 @@ class ConnectionFactory {
|
|||
break;
|
||||
|
||||
case 'oci':
|
||||
$eventManager->addEventSubscriber(new OracleSessionInit);
|
||||
// FIXME $eventManager->addEventSubscriber(new OracleSessionInit);
|
||||
// the driverOptions are unused in dbal and need to be mapped to the parameters
|
||||
if (isset($additionalConnectionParams['driverOptions'])) {
|
||||
$additionalConnectionParams = array_merge($additionalConnectionParams, $additionalConnectionParams['driverOptions']);
|
||||
|
|
@ -138,14 +138,14 @@ class ConnectionFactory {
|
|||
case 'sqlite3':
|
||||
$journalMode = $additionalConnectionParams['sqlite.journal_mode'];
|
||||
$additionalConnectionParams['platform'] = new OCSqlitePlatform();
|
||||
$eventManager->addEventSubscriber(new SQLiteSessionInit(true, $journalMode));
|
||||
// FIXME $eventManager->addEventSubscriber(new SQLiteSessionInit(true, $journalMode));
|
||||
break;
|
||||
}
|
||||
/** @var Connection $connection */
|
||||
$connection = DriverManager::getConnection(
|
||||
$additionalConnectionParams,
|
||||
new Configuration(),
|
||||
$eventManager
|
||||
// FIXME $eventManager
|
||||
);
|
||||
return $connection;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue