@@ -16,7 +16,7 @@ class MongodbConnectionFactory implements PsrConnectionFactory
1616 * The config could be an array, string DSN or null. In case of null it will attempt to connect to Mongodb localhost with default credentials.
1717 *
1818 * $config = [
19- * 'uri ' => 'mongodb://127.0.0.1/' - Mongodb connection string. see http://docs.mongodb.org/manual/reference/connection-string/
19+ * 'dsn ' => 'mongodb://127.0.0.1/' - Mongodb connection string. see http://docs.mongodb.org/manual/reference/connection-string/
2020 * 'dbname' => 'enqueue', - database name.
2121 * 'collection_name' => 'enqueue' - collection name
2222 * 'polling_interval' => '1000', - How often query for new messages (milliseconds)
@@ -39,7 +39,7 @@ public function __construct($config = 'mongodb:')
3939 throw new \LogicException ('The config must be either an array of options, a DSN string or null ' );
4040 }
4141 $ config = array_replace ([
42- 'uri ' => 'mongodb://127.0.0.1/ ' ,
42+ 'dsn ' => 'mongodb://127.0.0.1/ ' ,
4343 'dbname ' => 'enqueue ' ,
4444 'collection_name ' => 'enqueue ' ,
4545 ], $ config );
@@ -49,7 +49,7 @@ public function __construct($config = 'mongodb:')
4949
5050 public function createContext ()
5151 {
52- $ client = new Client ($ this ->config ['uri ' ]);
52+ $ client = new Client ($ this ->config ['dsn ' ]);
5353
5454 return new MongodbContext ($ client , $ this ->config );
5555 }
@@ -75,10 +75,10 @@ public static function parseDsn($dsn)
7575 }
7676 if ('mongodb: ' === $ dsn ) {
7777 return [
78- 'uri ' => 'mongodb://127.0.0.1/ ' ,
78+ 'dsn ' => 'mongodb://127.0.0.1/ ' ,
7979 ];
8080 }
81- $ config ['uri ' ] = $ dsn ;
81+ $ config ['dsn ' ] = $ dsn ;
8282 if (isset ($ parsedUrl ['path ' ]) && '/ ' !== $ parsedUrl ['path ' ]) {
8383 $ pathParts = explode ('/ ' , $ parsedUrl ['path ' ]);
8484 //DB name
0 commit comments