Skip to content

Commit fb6a9c8

Browse files
committed
Remove duplicate deprecation notices for query options
1 parent 0960e1c commit fb6a9c8

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/Operation/Find.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@
3737
use function is_string;
3838
use function MongoDB\document_to_array;
3939
use function MongoDB\is_document;
40-
use function trigger_error;
41-
42-
use const E_USER_DEPRECATED;
4340

4441
/**
4542
* Operation for the find command.
@@ -285,14 +282,6 @@ public function __construct(private string $databaseName, private string $collec
285282
unset($this->options['readConcern']);
286283
}
287284

288-
if (isset($this->options['snapshot'])) {
289-
trigger_error('The "snapshot" option is deprecated and will be removed in a future release', E_USER_DEPRECATED);
290-
}
291-
292-
if (isset($this->options['maxScan'])) {
293-
trigger_error('The "maxScan" option is deprecated and will be removed in a future release', E_USER_DEPRECATED);
294-
}
295-
296285
if (isset($this->options['codec']) && isset($this->options['typeMap'])) {
297286
throw InvalidArgumentException::cannotCombineCodecAndTypeMap();
298287
}

tests/Operation/FindTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,6 @@ public static function provideInvalidConstructorOptions()
5555
]);
5656
}
5757

58-
public function testSnapshotOptionIsDeprecated(): void
59-
{
60-
$this->assertDeprecated(function (): void {
61-
new Find($this->getDatabaseName(), $this->getCollectionName(), [], ['snapshot' => true]);
62-
});
63-
64-
$this->assertDeprecated(function (): void {
65-
new Find($this->getDatabaseName(), $this->getCollectionName(), [], ['snapshot' => false]);
66-
});
67-
}
68-
69-
public function testMaxScanOptionIsDeprecated(): void
70-
{
71-
$this->assertDeprecated(function (): void {
72-
new Find($this->getDatabaseName(), $this->getCollectionName(), [], ['maxScan' => 1]);
73-
});
74-
}
75-
7658
/** @dataProvider provideInvalidConstructorCursorTypeOptions */
7759
public function testConstructorCursorTypeOption($cursorType): void
7860
{

0 commit comments

Comments
 (0)