Skip to content

Commit d53756e

Browse files
authored
Revert "Add support for missing Postgres connection options (#54101)" (#54195)
This reverts commit 36a4a53.
1 parent 04955c4 commit d53756e

File tree

1 file changed

+2
-59
lines changed

1 file changed

+2
-59
lines changed

src/Illuminate/Database/Connectors/PostgresConnector.php

Lines changed: 2 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,7 @@ protected function getDsn(array $config)
150150
$dsn .= ";application_name='".str_replace("'", "\'", $application_name)."'";
151151
}
152152

153-
$dsn = $this->addSslOptions($dsn, $config);
154-
155-
return $this->addPostgresOptions($dsn, $config);
153+
return $this->addSslOptions($dsn, $config);
156154
}
157155

158156
/**
@@ -164,62 +162,7 @@ protected function getDsn(array $config)
164162
*/
165163
protected function addSslOptions($dsn, array $config)
166164
{
167-
foreach ([
168-
'sslmode',
169-
'sslcert',
170-
'sslkey',
171-
'sslrootcert',
172-
'requiressl',
173-
'sslnegotiation',
174-
'sslcompression',
175-
'sslpassword',
176-
'sslcertmode',
177-
'sslcrl',
178-
'sslcrldir',
179-
'sslsni',
180-
] as $option) {
181-
if (isset($config[$option])) {
182-
$dsn .= ";{$option}={$config[$option]}";
183-
}
184-
}
185-
186-
return $dsn;
187-
}
188-
189-
/**
190-
* Add Postgres specific options to the DSN.
191-
*
192-
* @param string $dsn
193-
* @param array $config
194-
* @return string
195-
*/
196-
protected function addPostgresOptions($dsn, array $config)
197-
{
198-
foreach ([
199-
'channel_binding',
200-
'connect_timeout',
201-
'fallback_application_name',
202-
'gssdelegation',
203-
'gssencmode',
204-
'gsslib',
205-
'hostaddr',
206-
'keepalives',
207-
'keepalives_count',
208-
'keepalives_idle',
209-
'keepalives_interval',
210-
'krbsrvname',
211-
'load_balance_hosts',
212-
'options',
213-
'passfile',
214-
'replication',
215-
'require_auth',
216-
'requirepeer',
217-
'service',
218-
'ssl_max_protocol_version',
219-
'ssl_min_protocol_version',
220-
'target_session_attrs',
221-
'tcp_user_timeout',
222-
] as $option) {
165+
foreach (['sslmode', 'sslcert', 'sslkey', 'sslrootcert'] as $option) {
223166
if (isset($config[$option])) {
224167
$dsn .= ";{$option}={$config[$option]}";
225168
}

0 commit comments

Comments
 (0)