Closed
Description
My Mongo DSN looks like mongodb://mongo:27017/dbname
. Using this configuration yields an error about "$databaseName is not defined":
'mongo' => [
'driver' => 'mongodb',
'dsn' => 'mongodb://mongo:27017/dbname',
]
Adding a database name to the configuration works around the issue, but it is redundant with the information in the URL:
'mongo' => [
'driver' => 'mongodb',
'dsn' => 'mongodb://mongo:27017/dbname',
'database' => 'dbname',
]
All our other environments in both PHP & JS work just fine with only the DSN and no DB name specified, including ones using the same base PHP Mongo driver. database
should not be required with a full dsn
.