Skip to content

DOCSP-41973 Read Landing Page #148

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

Merged
merged 9 commits into from
Sep 26, 2024

Conversation

lindseymoore
Copy link
Collaborator

@lindseymoore lindseymoore commented Sep 23, 2024

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-41973
Staging - https://deploy-preview-148--docs-php-library.netlify.app/read/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Sep 23, 2024

Deploy Preview for docs-php-library ready!

Name Link
🔨 Latest commit 63c1926
🔍 Latest deploy log https://app.netlify.com/sites/docs-php-library/deploys/66f5c107a50ffc00085e1453
😎 Deploy Preview https://deploy-preview-148--docs-php-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Collaborator

@mcmorisi mcmorisi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one fix!

@lindseymoore lindseymoore requested review from a team and GromNaN and removed request for a team September 25, 2024 18:10
Comment on lines +56 to +66
for ($changeStream->rewind(); true; $changeStream->next()) {
if ( ! $changeStream->valid()) {
continue;
}
$event = $changeStream->current();
echo toJSON($event) . PHP_EOL;

if ($event['operationType'] === 'invalidate') {
break;
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do...while would be more appropriate.

Suggested change
for ($changeStream->rewind(); true; $changeStream->next()) {
if ( ! $changeStream->valid()) {
continue;
}
$event = $changeStream->current();
echo toJSON($event) . PHP_EOL;
if ($event['operationType'] === 'invalidate') {
break;
}
}
$changeStream->rewind();
do {
$changeStream->next();
if ($changeStream->valid()) {
$event = $changeStream->current();
echo toJSON($event) . PHP_EOL;
}
} while ($event['operationType'] !== 'invalidate');

Have you looked at our changestream example?

Copy link
Collaborator Author

@lindseymoore lindseymoore Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because of time and for consistency with examples on the already approved Monitor Data Changes page, I'll keep as is here. I can look into revising the examples as you've suggested here in a future piece of work. Thanks!
Ticket: https://jira.mongodb.org/browse/DOCSP-43912

@lindseymoore lindseymoore merged commit c14727a into mongodb:php-standardization Sep 26, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants