Skip to content

Commit

Permalink
Support PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
clue committed Dec 4, 2021
1 parent d132fde commit ec9f3e2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"react/dns": "^1.8",
"react/event-loop": "^1.2",
"react/promise": "^2.6.0 || ^1.2.1",
"react/promise-timer": "^1.4.0",
"react/promise-timer": "^1.8",
"react/stream": "^1.2"
},
"require-dev": {
Expand Down
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
cacheResult="false">
cacheResult="false"
convertDeprecationsToExceptions="true">
<testsuites>
<testsuite name="React Test Suite">
<directory>./tests/</directory>
Expand Down
4 changes: 3 additions & 1 deletion src/DnsConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ public function connect($uri)
if (\strpos($uri, '://') === false) {
$uri = 'tcp://' . $uri;
$parts = \parse_url($uri);
unset($parts['scheme']);
if (isset($parts['scheme'])) {
unset($parts['scheme']);
}
} else {
$parts = \parse_url($uri);
}
Expand Down
4 changes: 3 additions & 1 deletion src/HappyEyeBallsConnector.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ public function connect($uri)
if (\strpos($uri, '://') === false) {
$uri = 'tcp://' . $uri;
$parts = \parse_url($uri);
unset($parts['scheme']);
if (isset($parts['scheme'])) {
unset($parts['scheme']);
}
} else {
$parts = \parse_url($uri);
}
Expand Down

0 comments on commit ec9f3e2

Please sign in to comment.