Skip to content

Commit

Permalink
[Firestore] Remove DocumentID setter warning (#12756)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewheard authored Apr 17, 2024
1 parent 5250da2 commit 9af2a9d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions Firestore/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
7 changes: 1 addition & 6 deletions Firestore/Swift/Source/Codable/DocumentID.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,7 @@ public struct DocumentID<Value: DocumentIDWrappable & Codable>:

public var wrappedValue: Value? {
get { value }
set {
if let someNewValue = newValue {
logIgnoredValueWarning(value: someNewValue)
}
value = newValue
}
set { value = newValue }
}

private func logIgnoredValueWarning(value: Value) {
Expand Down

0 comments on commit 9af2a9d

Please sign in to comment.