Skip to content

Compatibility fixes for PHPC and HHVM #21

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 5 commits into from
Jun 19, 2015
Merged

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented Jun 18, 2015

No description provided.

Perhaps, an alternative could be to use access properties instead of array
elements?
@@ -2,6 +2,8 @@

namespace MongoDB\Operation;

require 'src/functions.php';

Copy link
Member Author

Choose a reason for hiding this comment

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

Composer should handle autoloading and requiring src/functions.php, so this shouldn't be necessary. Can you try regenerating your autoloaders again with composer dump-autoload or composer update?

Copy link
Contributor

Choose a reason for hiding this comment

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

You're right - you can strip this commit out.

jmikola added 2 commits June 19, 2015 16:31
Unless the operation returns a scalar or custom value (e.g. Count, CreateIndexes), we should explicitly convert documents to stdClass instances to return. This will ultimately be made configurable once PHPLIB-112 is implemented.

A manual cast (of arrays to objects) was also necessary until PHPC-318 is implemented.
Normalizing top-level documents as arrays will allow single and multi-document checks to be more flexible. This will not extend to embedded documents, where we'll still need to be explicit.

Additionally, assertSameDocuments can now operate on any array or Traversable without needing to set its own type map.
@jmikola
Copy link
Member Author

jmikola commented Jun 19, 2015

@derickr: Please let me know if this works for you.

@jmikola jmikola merged commit 0437bb8 into mongodb:master Jun 19, 2015
jmikola added a commit that referenced this pull request Jun 19, 2015
@jmikola jmikola deleted the hhvm-fixes branch June 19, 2015 23:02
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.

2 participants