-
Type: Task
-
Resolution: Works as Designed
-
Priority: Minor - P4
-
None
-
Affects Version/s: 1.3.0
-
Component/s: None
-
None
-
Environment:
I try create object \MongoDB\Client with
$uriOptions['readPreference'] = \MongoDB\Driver\ReadPreference::RP_PRIMARY;
I have exception \MongoDB\Exception\InvalidArgumentException with message "Expected string for "readPreference" URI option, 32-bit integer given".
It was work for previous versions.
I suggest allow pass for readPreference option integer mode from class http://php.net/manual/ru/mongodb-driver-readpreference.construct.php
- is related to
-
PHPC-1489 Deprecate using ReadPreference integer constants
- Closed
-
PHPC-887 Throw exceptions for unexpected types in URI options array
- Closed
-
PHPC-904 ReadPreference constructor should accept strings
- Closed
-
CDRIVER-782 Allow more detailed error reporting for failed URI parsing
- Closed
- related to
-
PHPC-1021 Remove ReadPreference integer constants and require strings in constructor
- Closed