- 
  Notifications
 You must be signed in to change notification settings 
- Fork 1.4k
 PHPORM-239 Convert _id and UTCDateTime in results of Model::raw() before hydratation
 #3152
 
 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
f07eb5a to
 07a44cc  
 Compare
 
 I don't see any way to change this behavior without breaking backward compatibility.
d84a160 to
 fcff84e  
 Compare
 
 10c98ee to
 7f0b77e  
 Compare
 
 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.
Confirmed that PHP correctly calls the has_property handler when using property_exists: https://github.com/php/php-src/blob/1be989bbf0e46db8438384db184fca424392cfef/Zend/zend_builtin_functions.c#L1020..L1023 
_id and UTCDateTime in results of Model::raw() before hydratation (追記ここまで)
 17ae859 to
 5a79bec  
 Compare
 
 LGTM, but tests need a little more work.
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.
We don't convert nested documents and array into array for single result. This is easily done for cursor and BSON documents with typemap.
6615ebb to
 33d0720  
 Compare
 
 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.
Added this test case to ensure DB::where($filter)->get() is identical to $collection->find($filter) (for the doc team).
33d0720 to
 6763914  
 Compare
 
 
Uh oh!
There was an error while loading. Please reload this page.
Fix PHPORM-239
Fix #3151
Checklist