PHPLIB-1609 Don't mandate the use of "distanceField" in $geoNear#1569
PHPLIB-1609 Don't mandate the use of "distanceField" in $geoNear#1569GromNaN merged 1 commit intomongodb:v1.xfrom
$geoNear#1569Conversation
The $geoNear distanceField argument is now optional for queries on non-timeseries collections.
| * Default: false. | ||
| */ | ||
| public static function geoNear( | ||
| string $distanceField, |
There was a problem hiding this comment.
The parameter was put first because required parameters must be before the optional ones. Changing the order of the parameters would be a breaking change one the library is released.
There was a problem hiding this comment.
I worry that the server being able to make such changes at will (where we might require a BC break to maintain consistency) is going to inevitably become a problem down the line.
Had you not caught this before a release, how could PHPLIB-1609 have been implemented?
jmikola
left a comment
There was a problem hiding this comment.
Change looks fine but I'm concerned about how we might get screwed over by a similar change down the line.
| * Default: false. | ||
| */ | ||
| public static function geoNear( | ||
| string $distanceField, |
There was a problem hiding this comment.
I worry that the server being able to make such changes at will (where we might require a BC break to maintain consistency) is going to inevitably become a problem down the line.
Had you not caught this before a release, how could PHPLIB-1609 have been implemented?
Fix PHPLIB-1609 see DRIVERS-3071
The
$geoNeardistanceField argument is now optional for queries on non-timeseries collections.