Skip to content

Commit c7f05a0

Browse files
authored
PHPLIB-678: Remove obsolete handling of options arg for insertMany (#968)
1 parent 224969e commit c7f05a0

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

tests/UnifiedSpecTests/Operation.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -507,16 +507,12 @@ static function ($request) {
507507
);
508508

509509
case 'insertMany':
510-
// Merge nested and top-level options (see: SPEC-1158)
511-
$options = isset($args['options']) ? (array) $args['options'] : [];
512-
$options += array_diff_key($args, ['documents' => 1]);
513-
514510
assertArrayHasKey('documents', $args);
515511
assertIsArray($args['documents']);
516512

517513
return $collection->insertMany(
518514
$args['documents'],
519-
$options
515+
array_diff_key($args, ['documents' => 1])
520516
);
521517

522518
case 'insertOne':

tests/UnifiedSpecTests/Util.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ final class Util
104104
'findOneAndUpdate' => ['let', 'returnDocument', 'filter', 'update', 'session', 'upsert', 'projection', 'remove', 'arrayFilters', 'bypassDocumentValidation', 'collation', 'hint', 'maxTimeMS', 'sort', 'comment'],
105105
'updateMany' => ['let', 'filter', 'update', 'session', 'upsert', 'arrayFilters', 'bypassDocumentValidation', 'collation', 'hint', 'comment'],
106106
'updateOne' => ['let', 'filter', 'update', 'session', 'upsert', 'arrayFilters', 'bypassDocumentValidation', 'collation', 'hint', 'comment'],
107-
'insertMany' => ['options', 'documents', 'session', 'ordered', 'bypassDocumentValidation', 'comment'],
107+
'insertMany' => ['documents', 'session', 'ordered', 'bypassDocumentValidation', 'comment'],
108108
'insertOne' => ['document', 'session', 'bypassDocumentValidation', 'comment'],
109109
'listIndexes' => ['session', 'maxTimeMS', 'comment'],
110110
'mapReduce' => ['map', 'reduce', 'out', 'session', 'bypassDocumentValidation', 'collation', 'finalize', 'jsMode', 'limit', 'maxTimeMS', 'query', 'scope', 'sort', 'verbose', 'comment'],

0 commit comments

Comments
 (0)