Skip to content

Commit

Permalink
Merge pull request #66 from clue-labs/deps
Browse files Browse the repository at this point in the history
Update Socket dependency to support hosts file on all platforms
  • Loading branch information
clue committed Sep 25, 2017
2 parents cc932ec + 6ed2b16 commit 6116ca5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3",
"react/promise": "^2.0 || ^1.1",
"react/socket": "^1.0 || ^0.8 || ^0.7"
"react/socket": "^1.0 || ^0.8.3"
},
"autoload": {
"psr-4": { "Clue\\React\\Redis\\": "src/" }
Expand Down
4 changes: 0 additions & 4 deletions src/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ private function parseUrl($target)
$parts['port'] = 6379;
}

if ($parts['host'] === 'localhost') {
$parts['host'] = '127.0.0.1';
}

if (isset($parts['pass'])) {
$parts['auth'] = rawurldecode($parts['pass']);
}
Expand Down
4 changes: 2 additions & 2 deletions tests/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public function testWillConnectWithDefaultPort()
$this->factory->createClient('redis.example.com');
}

public function testWillConnectToLocalIpWhenTargetIsLocalhost()
public function testWillConnectToLocalhost()
{
$this->connector->expects($this->once())->method('connect')->with('127.0.0.1:1337')->willReturn(Promise\reject(new \RuntimeException()));
$this->connector->expects($this->once())->method('connect')->with('localhost:1337')->willReturn(Promise\reject(new \RuntimeException()));
$this->factory->createClient('localhost:1337');
}

Expand Down

0 comments on commit 6116ca5

Please sign in to comment.