-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: BSON
-
None
-
PHP Drivers
data is casted with native PHP cast feature in Laravel code: (object) $result and (array) $result.
Note that we could leverage the cast_object object handler in extension classes to facilitate converting a PackedArray into an array.
https://github.com/mongodb/laravel-mongodb/pull/3107#issuecomment-2309658318
This would be useful for MongoDB\BSON\PackedArray and MongoDB\BSON\Document.
But, I'm not sure we can implement it for PHPLIB classes
MongoDB\Model\BSONDocument and MongoDB\Model\BSONArray