-
Type:
Improvement
-
Resolution: Unresolved
-
Priority:
Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
PHP Drivers
-
None
-
None
-
None
-
None
-
None
-
None
Suggested by andreas.braun@mongodb.com in mongodb/mongo-php-driver#1763 (PHPC-2478):
we may want to revisit these exceptions to communicate the "document" type as an "object or hash" to avoid the confusing case that it needs to be an array but may not be a packed array.
Most error messages refer to "array or object" and do not clarify that PackedArray is excluded. That said, "object or hash" may not be the appropriate terminology since any type of PHP array might be accepted and encoded as a BSON document. The vague term is actually "object" if PackedArray is expressly prohibited.
If we move forward with this issue, we should also create a related PHPLIB ticket to make its messaging consistent with PHPC.