Expose BulkWriteCommand::$executed in debug and var_dump

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • PHP Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      The BulkWriteCommand doesn't expose the list of operations when using var_dump or xdebug. There is no way to inspect its contents without executing it and using a subscriber to get the raw command.

      I think the executed property should also be exposed, as it cannot be executed multiple times.

       

      Adding executed would make sense if we have the information already. As the operations list could potentially be big, I'd rather not expose it in the debug output.

      https://github.com/mongodb/mongo-php-driver/pull/1818#discussion_r2078485404 

            Assignee:
            Unassigned
            Reporter:
            Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: