Skip to content
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

Refactor to use \MongoClient instead of deprecated \Mongo #4

Merged
merged 6 commits into from Nov 9, 2016

Conversation

habashyjr
Copy link
Contributor

No description provided.

@habashyjr habashyjr mentioned this pull request Jan 5, 2015
if ($obj instanceof MongoId) {
return $obj;
}

if (is_int($obj)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Hmmm, not certain about this -- this function should always return a MongoId -- why return an integer?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's that case when you use incremental IDs in Mongo DB, using Doctrine ODM or using your own library (especially when migrating data from structured databases)
That's why I added the is_int check and return

@eonwhite
Copy link
Owner

Refactor looks good, much cleaner -- but I have a couple concerns, let me know your thoughts.

@habashyjr
Copy link
Contributor Author

@ibwhite any updates?

@eonwhite eonwhite merged commit abf1cf4 into eonwhite:master Nov 9, 2016
@eonwhite
Copy link
Owner

eonwhite commented Nov 9, 2016

@ahmedmhmd I'm sorry I left you hanging so long on this one. I've merged your PR.

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.

None yet

2 participants