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

Do not parse undocumented "database" key in URI options array

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 1.3.0-beta1, 1.3.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Support for parsing a "database" key in the options array was introduced by d017a80 for PHPC-229; however, this option was never documented for MongoDB\Driver\Manager::__construct().

      Historical note: In the legacy driver, MongoClient::__construct() did accept a "db" key in the options array.

      We should either remove support for this option or document it. To my knowledge, the mongoc_uri_t.database string is only used by mongoc_client_get_default_database(), which we do not utilize. It may be returned by mongoc_uri_get_auth_source() in the absence of an "authsource" URI option (as noted in the Connection URI docs).

            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:
              Resolved: