Skip to content

Commit 9af2a9d

Browse files
authored
[Firestore] Remove DocumentID setter warning (#12756)
1 parent 5250da2 commit 9af2a9d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Firestore/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# Unreleased
2+
- [changed] Passing a non-nil value to the `@DocumentID` property wrapper's
3+
setter no longer logs a warning since it discouraged valid patterns,
4+
e.g., updating the document ID after the document is created in Firestore. (#12756)
5+
16
# 10.24.0
27
- [feature] Enable queries with range & inequality filters on multiple fields. (#12416)
38

Firestore/Swift/Source/Codable/DocumentID.swift

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,7 @@ public struct DocumentID<Value: DocumentIDWrappable & Codable>:
121121

122122
public var wrappedValue: Value? {
123123
get { value }
124-
set {
125-
if let someNewValue = newValue {
126-
logIgnoredValueWarning(value: someNewValue)
127-
}
128-
value = newValue
129-
}
124+
set { value = newValue }
130125
}
131126

132127
private func logIgnoredValueWarning(value: Value) {

0 commit comments

Comments
 (0)