Uploaded image for project: 'PHP ORMs'
  1. PHP ORMs
  2. PHPORM-278

Rename Connection::getMongoDB and getMongoClient to getDatabase and getClient

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Trivial - P5 Trivial - P5
    • laravel-5.2.0
    • Affects Version/s: None
    • Component/s: Laravel
    • None
    • PHP Drivers
    • Needed
    • Hide

      Replace any call to Connection::getMongoDB with getDatabase

      and Connection::getMongoClient with getClient

      Show
      Replace any call to Connection::getMongoDB with getDatabase and Connection::getMongoClient with getClient
    • None
    • None
    • None
    • None
    • None
    • None

      https://github.com/mongodb/laravel-mongodb/pull/3205#discussion_r1859818502

      Noted that the Connection class has getMongoDB() and getMongoClient() methods that return a MongoDB\Database and MongoDB\Client, respectively. Not a fan of those names, as they smell like the legacy extension API.

      I'm not sure why they couldn't just be getDatabase() and getClient(). That seems beyond the scope of this PR, though.

      In 5.x:

      • add Connection::getDatabase and getClient,
      • deprecate Connection::getMongoDB and getMongoClient

      In 6.x:

      • remove Connection::getMongoDB and getMongoClient

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              None
              None
              None
              None