-
Type: Improvement
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.2.2
-
Component/s: None
-
None
Currently, the driver ignores unexpected types in the URI options array (e.g. if a ReadPreference object is passed to readPreference instead of a string value). It would be more helpful to users if we threw exceptions on unexpected types instead of silently ignoring options.
Generic boolean options (e.g. "ssl") are currently cast via bson_iter_as_bool(), so we will continue to accept all values for such options to preserve BC (see: PHPC-990). However, boolean options for read preferences and write concerns (e.g. "slaveOk", "journal") that were previously ignored due to an unexpected type will now throw.
- is related to
-
PHPC-825 Document URI options array for Manager constructor
- Closed
-
CDRIVER-782 Allow more detailed error reporting for failed URI parsing
- Closed
- related to
-
PHPC-1020 URI option readPreference as integer constant value
- Closed
-
PHPC-991 Handle duplicates in URI options array
- Closed
-
PHPC-990 Throw if generic boolean URI option has an unexpected type
- Closed
- links to