diff --git a/Firestore/CHANGELOG.md b/Firestore/CHANGELOG.md index d3e27b8442d..3c9e723abb3 100644 --- a/Firestore/CHANGELOG.md +++ b/Firestore/CHANGELOG.md @@ -1,3 +1,8 @@ +# Unreleased +- [changed] Passing a non-nil value to the `@DocumentID` property wrapper's + setter no longer logs a warning since it discouraged valid patterns, + e.g., updating the document ID after the document is created in Firestore. (#12756) + # 10.24.0 - [feature] Enable queries with range & inequality filters on multiple fields. (#12416) diff --git a/Firestore/Swift/Source/Codable/DocumentID.swift b/Firestore/Swift/Source/Codable/DocumentID.swift index 85df57273fe..1196b0a91bf 100644 --- a/Firestore/Swift/Source/Codable/DocumentID.swift +++ b/Firestore/Swift/Source/Codable/DocumentID.swift @@ -121,12 +121,7 @@ public struct DocumentID: public var wrappedValue: Value? { get { value } - set { - if let someNewValue = newValue { - logIgnoredValueWarning(value: someNewValue) - } - value = newValue - } + set { value = newValue } } private func logIgnoredValueWarning(value: Value) {