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

Correctly document option inheritance rules for execute methods

    • Type: Icon: Bug Bug
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Docs for Manager::executeCommand() incorrectly state that the URI's read preference may be used:

      Selects a server according to the "readPreference" option and executes the command on that server. By default, the read preference from the MongoDB Connection URI will be used.

      This appears to be copypasta from executeReadCommand dating back to php/doc-en@77ff972 for PHPC-834.

      Moreover, the various execute methods for both Manager and Server don't discuss that options may be inherited from an active transaction. This is mentioned in the corresponding libmongoc docs:

      The rules for inheriting from a transaction may be more subtle for executeQuery and executeBulkWrite:

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

              Created:
              Updated: