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:

      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:

            jmikola@mongodb.com Jeremy Mikola
            jmikola@mongodb.com Jeremy Mikola
            0 Vote for this issue
            1 Start watching this issue