-
Jeremy Mikola authored
Added ChangeStream::getResumeToken() method (PHPLIB-435), which returns the cached resume token. postBatchResumeToken and startAfter (introduced in PHPLIB-407) can now be used for resuming. Replaced TailableCursorIterator with ChangeStreamIterator. In addition to avoiding getMore commands when calling rewind(), the new class also tracks the size of each cursor batch so it can capture the postBatchResumeToken from getMore commands. Refactored the resume process such that Watch now exclusively constructs the inner iterator for ChangeStream. UnexpectedValueException is now thrown if firstBatch and nextBatch fields are not found in aggregate and getMore responses, respectively.
4c6f7ceb