From 83021c592e3656622c6d8ada91fddd0895ec8fdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Fri, 11 Apr 2025 09:14:07 +0200 Subject: [PATCH] Mention Serializable/Unserializable types in upgrade guide (#1805) --- UPGRADE-2.0.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UPGRADE-2.0.md b/UPGRADE-2.0.md index 534c8f126..71d2eff89 100644 --- a/UPGRADE-2.0.md +++ b/UPGRADE-2.0.md @@ -1,6 +1,10 @@ UPGRADE FROM 1.x to 2.0 ======================= + * Add return type to implementations of `MongoDB\BSON\Serializable::bsonSerialize()`, + with `array|\stdClass|Document|PackedArray` or a subset of this union type. + * Add parameter and return type to implementations of `MongoDB\BSON\Unserializable` + to comply with the `bsonUnserialize(array $data): void` signature. * The `getServer()` method has been removed from the CommandFailedEvent, CommandStartedEvent, and CommandSucceededEvent event classes. The `getHost()` and `getPort()` methods have been added in its place.