Skip to content

Commit 8ee5e43

Browse files
committed
Clean tlsOptions and wrap into an array with the kms provider name as key
1 parent d2f489f commit 8ee5e43

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/DependencyInjection/Configuration.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -438,11 +438,7 @@ private function addConnectionsSection(ArrayNodeDefinition $rootNode): void
438438
->scalarNode('tlsCAFile')->end()
439439
->scalarNode('tlsCertificateKeyFile')->end()
440440
->scalarNode('tlsCertificateKeyFilePassword')->end()
441-
->booleanNode('tlsAllowInvalidCertificates')->end()
442-
->booleanNode('tlsAllowInvalidHostnames')->end()
443-
->booleanNode('tlsDisableCertificateRevocationCheck')->end()
444441
->booleanNode('tlsDisableOCSPEndpointCheck')->end()
445-
->booleanNode('tlsInsecure')->end()
446442
->end()
447443
->end()
448444
->end()

src/DependencyInjection/DoctrineMongoDBExtension.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,14 @@ private function normalizeAutoEncryption(array $autoEncryption, string $defaultD
528528
throw new InvalidArgumentException('The "kmsProvider" option must contain a "type" key.');
529529
}
530530

531+
$provider = $autoEncryption['kmsProvider']['type'];
531532
$autoEncryption['kmsProviders'] = [
532-
$autoEncryption['kmsProvider']['type'] => array_diff_key($autoEncryption['kmsProvider'], ['type' => true]),
533+
$provider => array_diff_key($autoEncryption['kmsProvider'], ['type' => true]),
533534
];
535+
if (isset($autoEncryption['tlsOptions'])) {
536+
$autoEncryption['tlsOptions'] = [$provider => $autoEncryption['tlsOptions']];
537+
}
538+
534539
unset($autoEncryption['kmsProvider']);
535540
unset($autoEncryption['masterKey']);
536541

0 commit comments

Comments
 (0)