-
Notifications
You must be signed in to change notification settings - Fork 268
PHPLIB-1708 Cast empty KMS provider into an object #1757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,18 @@ public function testConstructorAutoEncryptionOpts(): void | |
new Client(static::getUri(), [], ['autoEncryption' => $autoEncryptionOpts]); | ||
} | ||
|
||
#[DoesNotPerformAssertions] | ||
public function testConstructorEmptyKmsProvider(): void | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would this test have failed without the above patch? If not, is anything being tested at all? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes:
|
||
{ | ||
$autoEncryptionOpts = [ | ||
'keyVaultClient' => new Client(static::getUri()), | ||
'keyVaultNamespace' => 'default.keys', | ||
'kmsProviders' => ['gcp' => []], | ||
]; | ||
|
||
new Client(static::getUri(), [], ['autoEncryption' => $autoEncryptionOpts]); | ||
} | ||
|
||
#[DataProvider('provideInvalidConstructorDriverOptions')] | ||
public function testConstructorDriverOptionTypeChecks(array $driverOptions, string $exception = InvalidArgumentException::class): void | ||
{ | ||
|
Check notice
Code scanning / Psalm
MixedAssignment Note