Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-2512

Clearly communicate expected types for documents in error messages

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None