8000 Merge pull request #66 from clue-labs/deps · SimonFrings/reactphp-redis@6116ca5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6116ca5

Browse files
authored
Merge pull request clue#66 from clue-labs/deps
Update Socket dependency to support hosts file on all platforms
2 parents cc932ec + 6ed2b16 commit 6116ca5

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"evenement/evenement": "^3.0 || ^2.0 || ^1.0",
1717
"react/event-loop": "^1.0 || ^0.5 || ^0.4 || ^0.3",
1818
"react/promise": "^2.0 || ^1.1",
19-
"react/socket": "^1.0 || ^0.8 || ^0.7"
19+
"react/socket": "^1.0 || ^0.8.3"
2020
},
2121
"autoload": {
2222
"psr-4": { "Clue\\React\\Redis\\": "src/" }

src/Factory.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,6 @@ private function parseUrl($target)
107107
$parts['port'] = 6379;
108108
}
109109

110-
if ($parts['host'] === 'localhost') {
111-
$parts['host'] = '127.0.0.1';
112-
}
113-
114110
if (isset($parts['pass'])) {
115111
$parts['auth'] = rawurldecode($parts['pass']);
116112
}

tests/FactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ public function testWillConnectWithDefaultPort()
2727
$this->factory->createClient('redis.example.com');
2828
}
2929

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

0 commit comments

Comments
 (0)
0