Skip to content

Commit a088351

Browse files
committed
Mention Serializable/Unserializable types in upgrade guide
1 parent bf34d5b commit a088351

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

UPGRADE-2.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
UPGRADE FROM 1.x to 2.0
22
=======================
33

4+
* Add return type to implementations of `MongoDB\BSON\Serializable::bsonSerialize()`,
5+
with `array|\stdClass|Document|PackedArray` or a subset of this union type.
6+
* Add parameter and return type to implementations of `MongoDB\BSON\Unserializable`
7+
to comply with the `bsonUnserialize(array $data): void` signature.
48
* The `getServer()` method has been removed from the CommandFailedEvent,
59
CommandStartedEvent, and CommandSucceededEvent event classes. The `getHost()`
610
and `getPort()` methods have been added in its place.

0 commit comments

Comments
 (0)