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

Add support for SRV connection strings in split configuration

    • Type: Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Laravel

      ingLomeland has created Issue #2724: Connection string is missing the option to create dsn as a SRV dsn in laravel-mongodb. This Jira ticket was filed by GromNaN

      Issue Text:

      • Laravel-mongodb Version: 4.0
      • PHP Version: 8.2
      • Database Driver & Version: Mongodb atlas

      Description:

      In the documentation it says you can either use dsn env or pass host, username, password etc as their own env variables and it builds the string automatically. This works great for local development, but not if its required to use a SRV string

      Steps to reproduce

      1. Add connection details to mongodb atlas as host, username, password etc
      2. Try to connect

      Expected behaviour

      Should build the dsn string correctly

      Actual behaviour

      It does not, because it builds the string as a standard connection string "mongodb://hostname.....". To connect to mongodb atlas you need to use a SRV string which looks like this "mongodb+srv://username:password@hostname......"

      <details><summary><b>Logs</b>:</summary>
      Insert log.txt here (if necessary)
      </details>

            Assignee:
            jerome.tamarelle@mongodb.com Jérôme Tamarelle
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: