-
Type: Improvement
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
-
None
MongoDB\Driver\WriteResult getters currently return null if the libmongoc result document omits an expected field.
- Continue to return null for unacknowledged writes, but raise a deprecation notice informing users that this may change in 2.0 (see:
PHPC-2144) - Return 0 for any acknowledged writes if the field is not present. This may not actually happen in libmongoc, but it'd be a good defensive approach since results are BSON documents.
- is related to
-
PHPLIB-610 Support static analysis via Psalm
- Closed
- related to
-
PHPC-2144 WriteResult getters should throw exception if unacknowledged
- Closed
- links to