-
Notifications
You must be signed in to change notification settings - Fork 266
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
Conversation
Perhaps, an alternative could be to use access properties instead of array elements?
@@ -2,6 +2,8 @@ | |||
|
|||
namespace MongoDB\Operation; | |||
|
|||
require 'src/functions.php'; | |||
|
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.
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
?
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.
You're right - you can strip this commit out.
…he return value with a cast to 'object'
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.
@derickr: Please let me know if this works for you. |
No description provided.