Skip to content

Commit ed8ab96

Browse files
committed
Upgrade file
1 parent 89ce032 commit ed8ab96

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

UPGRADE-2.0.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ UPGRADE FROM 1.x to 2.0
44
* Classes in the namespace `MongoDB\Operation\` are `final`.
55
* All methods in interfaces and classes now define a return type.
66

7+
Operations with no result
8+
-------------------------
9+
10+
The following operations no longer return the raw command result. The return
11+
type changed to `void`. In case of an error, an exception is thrown.
12+
13+
* `MongoDB\Client`: `dropDatabase`
14+
* `MongoDB\Collection`: `drop`, `dropIndex`, `dropIndexes`, `dropSearchIndex`, `rename`
15+
* `MongoDB\Database`: `createCollection`, `drop`, `dropCollection`, `modifyCollection`, `renameCollection`
16+
* `MongoDB\Database::createEncryptedCollection()` return the list of encrypted fields
17+
18+
If you still need to access the raw command result, you can use a `CommandSubscriber`.
19+
720
GridFS
821
------
922

tests/Operation/ModifyCollectionFunctionalTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use MongoDB\Operation\ModifyCollection;
88
use PHPUnit\Framework\Attributes\Group;
99

10+
use function iterator_to_array;
11+
use function json_encode;
12+
1013
class ModifyCollectionFunctionalTest extends FunctionalTestCase
1114
{
1215
#[Group('matrix-testing-exclude-server-4.2-driver-4.0-topology-sharded_cluster')]

tests/Operation/RenameCollectionTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ public static function provideInvalidConstructorOptions()
2626
return self::createOptionDataProvider([
2727
'dropTarget' => self::getInvalidBooleanValues(),
2828
'session' => self::getInvalidSessionValues(),
29-
'typeMap' => self::getInvalidArrayValues(),
3029
'writeConcern' => self::getInvalidWriteConcernValues(),
3130
]);
3231
}

0 commit comments

Comments
 (0)