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: Done
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • 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?

      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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: