Report "data" as hex bytes in MongoDB\BSON\Binary debug output

XMLWordPrintableJSON

    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      We occasionally encounter test failures (example) due to newline or non-printable characters appearing in binary data (e.g. logical session IDs). For example:

      ========DIFF========
      [2021/10/11 18:31:51.252] 007+       string(16) "��إbIF���JT
      [2021/10/11 18:31:51.252] 008+ J"
      [2021/10/11 18:31:51.252] 007-       string(16) "%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c"
      [2021/10/11 18:31:51.252] ========DONE========
      [2021/10/11 18:31:51.252] FAIL MongoDB\Driver\Session debug output (before an operation) [tests/session/session-debug-001.phpt]
      

      While we could likely work around this in tests by using "%A" to permit whitespace, it may make more sense to report MongoDB\BSON\Binary's "data" field as hex bytes in debug output.

            Assignee:
            Pauline Vos
            Reporter:
            Jeremy Mikola (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: