diff --git a/composer.json b/composer.json index 9ff445f3..44805eac 100644 --- a/composer.json +++ b/composer.json @@ -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": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index fa88e7e0..93a36f6b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,8 +4,9 @@ + convertDeprecationsToExceptions="true"> ./tests/ diff --git a/src/DnsConnector.php b/src/DnsConnector.php index 0b51a52c..4f91bcb7 100644 --- a/src/DnsConnector.php +++ b/src/DnsConnector.php @@ -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); } diff --git a/src/HappyEyeBallsConnector.php b/src/HappyEyeBallsConnector.php index 0a7c6ecb..19af2607 100644 --- a/src/HappyEyeBallsConnector.php +++ b/src/HappyEyeBallsConnector.php @@ -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); }