Skip to content

Commit 12bed06

Browse files
committed
Merge branch '3.8.x' into 4.0.x
* 3.8.x: Add gssencmode option to connection string for PgSQL & PDO PgSQL driver (#6320)
2 parents c82a62e + b4329d5 commit 12bed06

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

docs/en/reference/configuration.rst

+2
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ pdo_pgsql / pgsql
280280
- ``sslcrl`` (string): specifies the filename of the SSL certificate
281281
revocation list (CRL).
282282
See `https://www.postgresql.org/docs/9.4/static/libpq-connect.html#LIBPQ-CONNECT-SSLCRL`
283+
- ``gssencmode`` (string): Optional GSS-encrypted channel/GSSEncMode configuration.
284+
See `https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNECT-GSSENCMODE`
283285
- ``application_name`` (string): Name of the application that is
284286
connecting to database. Optional. It will be displayed at ``pg_stat_activity``.
285287

src/Driver/PDO/PgSQL/Driver.php

+4
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ private function constructPdoDsn(array $params): string
104104
$dsn .= 'application_name=' . $params['application_name'] . ';';
105105
}
106106

107+
if (isset($params['gssencmode'])) {
108+
$dsn .= 'gssencmode=' . $params['gssencmode'] . ';';
109+
}
110+
107111
return $dsn;
108112
}
109113
}

src/Driver/PgSQL/Driver.php

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ private function constructConnectionString(
7474
'user' => $params['user'] ?? null,
7575
'password' => $params['password'] ?? null,
7676
'sslmode' => $params['sslmode'] ?? null,
77+
'gssencmode' => $params['gssencmode'] ?? null,
7778
],
7879
static fn (int|string|null $value) => $value !== '' && $value !== null,
7980
);

0 commit comments

Comments
 (0)