-
Notifications
You must be signed in to change notification settings - Fork 265
Remove deprecated functionality #1439
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
9bd1347
to
43a304d
Compare
21a2ef8
to
4edfa16
Compare
4edfa16
to
02de19c
Compare
$args['out'], | ||
array_diff_key($args, ['map' => 1, 'reduce' => 1, 'out' => 1]), | ||
)); | ||
Assert::markTestSkipped('mapReduce operation is not supported'); |
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.
Unfortunately, there's no markTestSkipped
helper function like the various assert
helpers, hence the static call in the assert class. The end result wouldn't differ, as this method only throws an exception. I figured that marking a test as skipped when it uses mapReduce
makes more sense than explicitly listing all tests. We currently list some tests explicitly when we don't support the tested operations, and we can consider moving those to the operation class as well to reduce the size of our skip list.
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.
In the past, my only concern with skipping at this point would be that we're already midway into the test. I trust this is safer now that we have a finally
block for some cleanup around operation execution: 90dcf18#diff-fab05380d19ea3d7a426128a38cde0e262291e90b82294c085a7397d949216a8R216
I suppose there's some wasted effort running the test until this point, but if that makes the skip list easier to digest I suppose it's worth the trade-off.
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.
Yeah, ideally all kinds of cleanup happens in finally
blocks to make sure we clean up. That said, I currently don't see any negative side effects, so it looks like we've done things properly, as I'd expect 😉
]); | ||
|
||
$this->assertSame(2, $info->getVersion()); | ||
$this->assertSame(['pos' => '2dsphere'], $info->getKey()); | ||
$this->assertSame('pos_2dsphere', $info->getName()); | ||
$this->assertSame('foo.bar', $info->getNamespace()); |
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.
How did this work previously if getNamespace()
was already emitting E_USER_DEPRECATED
?
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.
That's an excellent question 🤷♂️
$args['out'], | ||
array_diff_key($args, ['map' => 1, 'reduce' => 1, 'out' => 1]), | ||
)); | ||
Assert::markTestSkipped('mapReduce operation is not supported'); |
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.
In the past, my only concern with skipping at this point would be that we're already midway into the test. I trust this is safer now that we have a finally
block for some cleanup around operation execution: 90dcf18#diff-fab05380d19ea3d7a426128a38cde0e262291e90b82294c085a7397d949216a8R216
I suppose there's some wasted effort running the test until this point, but if that makes the skip list easier to digest I suppose it's worth the trade-off.
02de19c
to
69cd29c
Compare
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.
Please revert this change after rebase: #1412 (comment)
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.
It has been removed along with the entire test surrounding it.
69cd29c
to
221606e
Compare
* v2.x: PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478) PHPLIB-1227 Use void return types for operations without meaningful result document (#1468) Remove deprecated functionality (#1439) PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454) PHPLIB-954: Add return types to all methods (#1391) PHPLIB-797: Remove unused methods in UnsupportedException (#1436) Revert "Add final annotations to non-internal Operation classes (#1410)" PHPLIB-953 Make internal classes and Operation classes final (#1392) PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
* v2.x: PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478) PHPLIB-1227 Use void return types for operations without meaningful result document (#1468) Remove deprecated functionality (#1439) PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454) PHPLIB-954: Add return types to all methods (#1391) PHPLIB-797: Remove unused methods in UnsupportedException (#1436) Revert "Add final annotations to non-internal Operation classes (#1410)" PHPLIB-953 Make internal classes and Operation classes final (#1392) PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
* v2.x: Regenerate evergreen configuration (#1503) PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478) PHPLIB-1227 Use void return types for operations without meaningful result document (#1468) Remove deprecated functionality (#1439) PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454) PHPLIB-954: Add return types to all methods (#1391) PHPLIB-797: Remove unused methods in UnsupportedException (#1436) Revert "Add final annotations to non-internal Operation classes (#1410)" PHPLIB-953 Make internal classes and Operation classes final (#1392) PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
* v2.x: Add return type hint for Encoder::encode() implementation Reverse pipeline init from an array (#1596) PHPLIB-1617 Accept a Pipeline instance in aggregate and watch methods (#1580) Fix CS Require latest python version (#1564) (#1565) Update src/Operation/Find.php Ignore `disableMD5` option as `md5` field is removed from the spec (#1502) Remove obsolete baseline entries Regenerate evergreen configuration (#1503) PHPLIB-1546 and PHPLIB-1159: Remove CreateCollection flags and autoIndexId options (#1478) PHPLIB-1227 Use void return types for operations without meaningful result document (#1468) Remove deprecated functionality (#1439) PHPLIB-1518 `WriteResult::get*Count()` always return an int on acknowledged result (#1454) PHPLIB-954: Add return types to all methods (#1391) PHPLIB-797: Remove unused methods in UnsupportedException (#1436) Revert "Add final annotations to non-internal Operation classes (#1410)" PHPLIB-953 Make internal classes and Operation classes final (#1392) PHPLIB-1218 Remove deprecated fields from GridFS files (#1398)
This PR includes:
ChangeStream::CURSOR_NOT_FOUND
privateWatch::FULL_DOCUMENT_DEFAULT
IndexInfo::isGeoHaystack
methodmaxScan
,modifiers
,oplogReplay
, andsnapshot
query options forfind
andfindOne
MonogDB\Operation\Executable
interface