Skip to content

Commit 375688c

Browse files
committed
Work around latest PHP 7.0.18 and 7.1.4 no longer accepting full URIs
1 parent 57e3262 commit 375688c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/TcpConnector.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,12 @@ public function connect($uri)
6666
}
6767
}
6868

69-
// HHVM fails to parse URIs with a query but no path, so let's add a dummy path
70-
// See also https://3v4l.org/jEhLF
71-
if (defined('HHVM_VERSION') && isset($parts['query']) && !isset($parts['path'])) {
72-
$uri = str_replace('?', '/?', $uri); // @codeCoverageIgnore
73-
}
69+
// latest versions of PHP no longer accept any other URI components and
70+
// HHVM fails to parse URIs with a query but no path, so let's simplify our URI here
71+
$remote = 'tcp://' . $parts['host'] . ':' . $parts['port'];
7472

7573
$socket = @stream_socket_client(
76-
$uri,
74+
$remote,
7775
$errno,
7876
$errstr,
7977
0,

0 commit comments

Comments
 (0)