-
Notifications
You must be signed in to change notification settings - Fork 266
PHPLIB-530: Test against MongoDB 4.3 #723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
With MR being moved to aggregation, result order can sometimes be different than expected. This adds a sort function before assertions to avoid test failures due to sorting.
private $databaseName; | ||
|
||
/** | ||
* @param string|null $databaseName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doc block is inconsistent with the params.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the first argument is typed, it does not need a doc block to further clarify the type of the argument. I can add the @param
annotation, but it doesn't add any value to the method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't realize this was just intended to document the union type. SGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep: we can't use nullable types yet as they were only introduced in PHP 7.1.
@@ -14,6 +14,13 @@ | |||
*/ | |||
class CrudSpecTest extends FunctionalTestCase | |||
{ | |||
/** @var array */ | |||
private static $incompleteTests = [ | |||
'find-allowdiskuse: Find does not send allowDiskuse when value is not specified' => 'PHPLIB-500', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted that this depends on #721, which in turn is waiting for this PR to get merged.
$info = parent::current(); | ||
|
||
if ($this->databaseName !== null && isset($info['idIndex']) && ! isset($info['idIndex']['ns'])) { | ||
$info['idIndex']['ns'] = $this->databaseName . '.' . $info['name']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to PHPLIB-499 (#718)? If so, I'm curious if the spec change needs to be revised. mongodb/specifications@8ed5d56 for SPEC-1399 only addressed the listIndexes
, but I gather this pertains to some behavioral change in listCollections
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, which is why I missed this in the original PR. listCollections
returns information about the _id
index, which also omits the ns
key in 4.4+. I've created SPEC-1584 to track this and will add this to the spec.
https://jira.mongodb.org/browse/PHPLIB-530, https://jira.mongodb.org/browse/PHPLIB-515
While working on #721, I noticed that we don't test against MongoDB 4.3. This PR adds 4.3 to the build pipeline and fixes test failures that come from this. Also removes execution stats from MapReduce (PHPLIB-515).