@@ -124,7 +124,7 @@ public function testClientSideEncryption(stdClass $test, ?array $runOn, array $d
124
124
125
125
// TODO: Remove this once SERVER-66901 is implemented (see: PHPLIB-884)
126
126
if (isset ($ test ->clientOptions ->autoEncryptOpts ->encryptedFieldsMap )) {
127
- $ test ->clientOptions ->autoEncryptOpts ->encryptedFieldsMap = $ this -> prepareEncryptedFieldsMap ( $ test ->clientOptions ->autoEncryptOpts ->encryptedFieldsMap ) ;
127
+ $ test ->clientOptions ->autoEncryptOpts ->encryptedFieldsMap = $ test ->clientOptions ->autoEncryptOpts ->encryptedFieldsMap ;
128
128
}
129
129
130
130
try {
@@ -1233,7 +1233,7 @@ public function testExplicitEncryption(Closure $test): void
1233
1233
}
1234
1234
1235
1235
// Test setup
1236
- $ encryptedFields = $ this ->prepareEncryptedFields ( $ this -> decodeJson (file_get_contents (__DIR__ . '/client-side-encryption/etc/data/encryptedFields.json ' ) ));
1236
+ $ encryptedFields = $ this ->decodeJson (file_get_contents (__DIR__ . '/client-side-encryption/etc/data/encryptedFields.json ' ));
1237
1237
$ key1Document = $ this ->decodeJson (file_get_contents (__DIR__ . '/client-side-encryption/etc/data/keys/key1-document.json ' ));
1238
1238
$ key1Id = $ key1Document ->_id ;
1239
1239
@@ -1407,7 +1407,7 @@ private function createTestCollection(?stdClass $encryptedFields = null, ?stdCla
1407
1407
$ options = $ context ->defaultWriteOptions ;
1408
1408
1409
1409
if (! empty ($ encryptedFields )) {
1410
- $ options ['encryptedFields ' ] = $ this -> prepareEncryptedFields ( $ encryptedFields) ;
1410
+ $ options ['encryptedFields ' ] = $ encryptedFields ;
1411
1411
}
1412
1412
1413
1413
if (! empty ($ jsonSchema )) {
@@ -1530,34 +1530,6 @@ private function prepareCorpusData(string $fieldName, stdClass $data, ClientEncr
1530
1530
return $ data ->allowed ? $ returnData : $ data ;
1531
1531
}
1532
1532
1533
- /**
1534
- * @todo Remove this once SERVER-66901 is implemented
1535
- * @see https://jira.mongodb.org/browse/PHPLIB-884
1536
- */
1537
- private function prepareEncryptedFields (stdClass $ encryptedFields ): stdClass
1538
- {
1539
- foreach ($ encryptedFields ->fields as $ field ) {
1540
- if (isset ($ field ->queries ->contention )) {
1541
- $ field ->queries ->contention = $ this ->createInt64 ($ field ->queries ->contention );
1542
- }
1543
- }
1544
-
1545
- return $ encryptedFields ;
1546
- }
1547
-
1548
- /**
1549
- * @todo Remove this once SERVER-66901 is implemented
1550
- * @see https://jira.mongodb.org/browse/PHPLIB-884
1551
- */
1552
- private function prepareEncryptedFieldsMap (stdClass $ encryptedFieldsMap ): stdClass
1553
- {
1554
- foreach ($ encryptedFieldsMap as $ namespace => $ encryptedFields ) {
1555
- $ encryptedFieldsMap ->{$ namespace } = $ this ->prepareEncryptedFields ($ encryptedFields );
1556
- }
1557
-
1558
- return $ encryptedFieldsMap ;
1559
- }
1560
-
1561
1533
private static function isCryptSharedLibAvailable (): bool
1562
1534
{
1563
1535
$ cryptSharedLibPath = getenv ('CRYPT_SHARED_LIB_PATH ' );
0 commit comments