Closed
Description
Symfony version(s) affected: 5.1.0
Description
@jmikola has raised concerns with our handling of both the database
path and collection
query string in a MongoDbStore
constructed with a MongoDB connection URI. Please see #37140 (comment)
How to reproduce
Construction of a MongoDbStore
using a MongoDB connection URI with collection=
in the querystring.
Possible Solution
We should remove collection
from the query string before passing the URI to the driver.
Additional context
#37140 (comment)
See the note regarding libmongoc client and connection re-use internally: https://www.php.net/manual/en/mongodb.connection-handling.php