mongo-php-driver
mongo-php-driver copied to clipboard
PHPC-1489: Deprecate integer readPreference constants
PHPC-1489
This deprecates the RP_* constants in MongoDB\Driver\ReadPreference constants, along with passing an int in the constructor and using getMode.
Note that PHP 8.3 and newer automagically triggers warnings when using deprecated warnings. Calling deprecated methods results in a warning starting in PHP 7.4 (albeit with a wrong message in PHP 7.4).
Do you keep any test that use the legacy constants to ensure they still work even if they are deprecated?
Added now.
Note: I'll have to revisit the failing Windows Build tasks for PHP 7.4 and 8.0 separately - deferring the merge until those have been taken care of.