Commit Graph

4 Commits

Author SHA1 Message Date
Jeremy Mikola 366dcbe7d2 PHPC-1411: Prefer integer types for wtimeout when possible
For serialization, 64-bit wtimeout values will always be encoded as strings for portability. Debug output and bsonSerialize() can always use integers on 64-bit platforms and can fall back to strings and Int64 objects on 32-bit platforms, respectively.
2019-12-19 06:51:06 +01:00
Andreas Braun cdff70faf6 PHPC-1411: Accept 64-bit integers for wTimeoutMS 2019-12-19 06:50:41 +01:00
Jeremy Mikola 98a7abaa21 PHPC-1216: Always validate and apply wtimeoutMS in URI options array 2018-06-25 16:19:16 -04:00
Jeremy Mikola ce328f1a89 PHPC-887: Throw for unexpected types in URI options array
Note: generic boolean options (e.g. "ssl") will continue to accept non-boolean types for BC, since we cast via bson_iter_as_bool(). However, RP and WC-specific boolean options (e.g. "slaveOk", "journal") will throw since they previously silently ignored non-boolean values.

In addition to revising read preference tests, this adds new tests for read concern and write concern options.
2017-08-08 09:41:47 -04:00