Skip to content

Commit

Permalink
Update PostgresConnector.php
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell authored Jan 7, 2025
1 parent c75fd97 commit b344618
Showing 1 changed file with 39 additions and 43 deletions.
82 changes: 39 additions & 43 deletions src/Illuminate/Database/Connectors/PostgresConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,22 +164,20 @@ protected function getDsn(array $config)
*/
protected function addSslOptions($dsn, array $config)
{
foreach (
[
'sslmode',
'sslcert',
'sslkey',
'sslrootcert',
'requiressl',
'sslnegotiation',
'sslcompression',
'sslpassword',
'sslcertmode',
'sslcrl',
'sslcrldir',
'sslsni',
] as $option
) {
foreach ([
'sslmode',
'sslcert',
'sslkey',
'sslrootcert',
'requiressl',
'sslnegotiation',
'sslcompression',
'sslpassword',
'sslcertmode',
'sslcrl',
'sslcrldir',
'sslsni',
] as $option) {
if (isset($config[$option])) {
$dsn .= ";{$option}={$config[$option]}";
}
Expand All @@ -197,33 +195,31 @@ protected function addSslOptions($dsn, array $config)
*/
protected function addPostgresOptions($dsn, array $config)
{
foreach (
[
'channel_binding',
'connect_timeout',
'fallback_application_name',
'gssdelegation',
'gssencmode',
'gsslib',
'hostaddr',
'keepalives',
'keepalives_count',
'keepalives_idle',
'keepalives_interval',
'krbsrvname',
'load_balance_hosts',
'options',
'passfile',
'replication',
'require_auth',
'requirepeer',
'service',
'ssl_max_protocol_version',
'ssl_min_protocol_version',
'target_session_attrs',
'tcp_user_timeout',
] as $option
) {
foreach ([
'channel_binding',
'connect_timeout',
'fallback_application_name',
'gssdelegation',
'gssencmode',
'gsslib',
'hostaddr',
'keepalives',
'keepalives_count',
'keepalives_idle',
'keepalives_interval',
'krbsrvname',
'load_balance_hosts',
'options',
'passfile',
'replication',
'require_auth',
'requirepeer',
'service',
'ssl_max_protocol_version',
'ssl_min_protocol_version',
'target_session_attrs',
'tcp_user_timeout',
] as $option) {
if (isset($config[$option])) {
$dsn .= ";{$option}={$config[$option]}";
}
Expand Down

0 comments on commit b344618

Please sign in to comment.