{ if ($connOrUrl instanceof Connection
) { if (!
$connOrUrl->
getDatabasePlatform() instanceof PostgreSQLPlatform
) { throw new InvalidArgumentException(sprintf('The adapter "%s" does not support the "%s" platform.', __CLASS__,
$connOrUrl->
getDatabasePlatform()::
class));
} $this->conn =
$connOrUrl;
} else { if (!
class_exists(DriverManager::
class)) { throw new InvalidArgumentException('Failed to parse DSN. Try running "composer require doctrine/dbal".'
);
} if (class_exists(DsnParser::
class)) { $params =
(new DsnParser([ 'db2' => 'ibm_db2',
'mssql' => 'pdo_sqlsrv',
'mysql' => 'pdo_mysql',
'mysql2' => 'pdo_mysql',
'postgres' => 'pdo_pgsql',
'postgresql' => 'pdo_pgsql',
'pgsql' => 'pdo_pgsql',
'sqlite' => 'pdo_sqlite',
'sqlite3' => 'pdo_sqlite',
]))->
parse($this->
filterDsn($connOrUrl));
} else {