File tree Expand file tree Collapse file tree 4 files changed +3
-10
lines changed Expand file tree Collapse file tree 4 files changed +3
-10
lines changed Original file line number Diff line number Diff line change 471
471
<code >$this-> options['writeConcern']</code >
472
472
</MixedArgument >
473
473
<MixedAssignment occurrences =" 5" >
474
- <code >$cmd['writeConcern ']</code >
474
+ <code >$cmd['comment ']</code >
475
475
<code >$deleteOptions['hint']</code >
476
476
<code >$options['comment']</code >
477
477
<code >$options['session']</code >
Original file line number Diff line number Diff line change @@ -300,9 +300,6 @@ public function getCommandDocument()
300
300
{
301
301
$ cmd = $ this ->createCommandDocument ();
302
302
303
- // The 'explain' option is incompatible with the explain command
304
- unset($ cmd ['explain ' ]);
305
-
306
303
// Read concern can change the query plan
307
304
if (isset ($ this ->options ['readConcern ' ])) {
308
305
$ cmd ['readConcern ' ] = $ this ->options ['readConcern ' ];
Original file line number Diff line number Diff line change @@ -338,11 +338,6 @@ public function getCommandDocument()
338
338
return $ cmd ;
339
339
}
340
340
341
- // Read concern can change the query plan
342
- if (isset ($ this ->options ['readConcern ' ])) {
343
- $ cmd ['readConcern ' ] = $ this ->options ['readConcern ' ];
344
- }
345
-
346
341
// maxAwaitTimeMS is a Query level option so should not be considered here
347
342
unset($ options ['maxAwaitTimeMS ' ]);
348
343
Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ public function testExplainableCommandDocument(): void
122
122
'readConcern ' => new ReadConcern (ReadConcern::LOCAL ),
123
123
'useCursor ' => true ,
124
124
// Intentionally omitted options
125
- ' explain ' => true ,
125
+ // The " explain" option is illegal
126
126
'readPreference ' => new ReadPreference (ReadPreference::SECONDARY_PREFERRED ),
127
127
'typeMap ' => ['root ' => 'array ' , 'document ' => 'array ' ],
128
128
'writeConcern ' => new WriteConcern (0 ),
@@ -140,6 +140,7 @@ public function testExplainableCommandDocument(): void
140
140
'maxTimeMS ' => 100 ,
141
141
'readConcern ' => new ReadConcern (ReadConcern::LOCAL ),
142
142
'let ' => (object ) ['a ' => 1 ],
143
+ 'cursor ' => ['batchSize ' => 100 ],
143
144
];
144
145
$ this ->assertEquals ($ expected , $ operation ->getCommandDocument ());
145
146
}
You can’t perform that action at this time.
0 commit comments