Skip to content

Commit 2df19ed

Browse files
committed
PHPLIB-220: Default Client URI to "mongodb://127.0.0.1/"
1 parent b4ba7a7 commit 2df19ed

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Client
4242
* @param array $driverOptions Driver-specific options
4343
* @throws InvalidArgumentException
4444
*/
45-
public function __construct($uri = 'mongodb://localhost:27017', array $uriOptions = [], array $driverOptions = [])
45+
public function __construct($uri = 'mongodb://127.0.0.1/', array $uriOptions = [], array $driverOptions = [])
4646
{
4747
$driverOptions += ['typeMap' => self::$defaultTypeMap];
4848

tests/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function testConstructorDefaultUri()
1616
{
1717
$client = new Client();
1818

19-
$this->assertEquals('mongodb://localhost:27017', (string) $client);
19+
$this->assertEquals('mongodb://127.0.0.1/', (string) $client);
2020
}
2121

2222
/**

0 commit comments

Comments
 (0)