From 71e53c925e3f5efced68ce0f77cb5b93bde36259 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 1 Apr 2025 03:35:55 -0500 Subject: [PATCH] docs: deprecate setting ProtocolResponse.session to null (36-x-y) (#46366) docs: mark null ProtocolResponse.session as deprecated in v36 --- docs/breaking-changes.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/breaking-changes.md b/docs/breaking-changes.md index f09a7a3f3d7c..b717ca9d1e00 100644 --- a/docs/breaking-changes.md +++ b/docs/breaking-changes.md @@ -32,6 +32,16 @@ When calling `Session.clearStorageData(options)`, the `options.quota` property is deprecated. Since the `syncable` type was removed, there is only type left -- `'temporary'` -- so specifying it is unnecessary. +### Deprecated: `null` value for `session` property in `ProtocolResponse` + +Previously, setting the ProtocolResponse.session property to `null` +Would create a random independent session. This is no longer supported. + +Using single-purpose sessions here is discouraged due to overhead costs; +however, old code that needs to preserve this behavior can emulate it by +creating a random session with `session.fromPartition(some_random_string)` +and then using it in `ProtocolResponse.session`. + ### Deprecated: Extension methods and events on `session` `session.loadExtension`, `session.removeExtension`, `session.getExtension`,