From 7d399256c1af8d6169c0b8865339360daf3c27cf Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 13 Dec 2019 00:18:38 +0100 Subject: [PATCH 1/3] cs-fix --- .travis.yml | 3 +-- lib/Internal/HttpsSocket.php | 2 +- lib/Internal/Socket.php | 2 +- lib/Rfc8484StubResolver.php | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 71b9734..2e811e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,9 @@ sudo: false language: php php: - - 7.0 - - 7.1 - 7.2 - 7.3 + - 7.4 - nightly matrix: diff --git a/lib/Internal/HttpsSocket.php b/lib/Internal/HttpsSocket.php index 4af5cac..40d99b3 100644 --- a/lib/Internal/HttpsSocket.php +++ b/lib/Internal/HttpsSocket.php @@ -70,7 +70,7 @@ final class HttpsSocket extends Socket $request->setBody($data); $request->setHeader('content-type', 'application/dns-message'); $request->setHeader('accept', 'application/dns-message'); - $request->setHeader('content-length', strlen($data)); + $request->setHeader('content-length', \strlen($data)); $request->setHeaders($this->nameserver->getHeaders()); break; case Nameserver::GOOGLE_JSON: diff --git a/lib/Internal/Socket.php b/lib/Internal/Socket.php index 5debc5a..8428dde 100644 --- a/lib/Internal/Socket.php +++ b/lib/Internal/Socket.php @@ -146,7 +146,7 @@ abstract class Socket $message = "Unexpected error during resolution: ".$exception->getMessage(); $exception = new DnsException($message, 0, $exception); } - + $pending = $this->pending; $this->pending = []; diff --git a/lib/Rfc8484StubResolver.php b/lib/Rfc8484StubResolver.php index 8376d4f..65ccf2c 100644 --- a/lib/Rfc8484StubResolver.php +++ b/lib/Rfc8484StubResolver.php @@ -153,7 +153,7 @@ final class Rfc8484StubResolver implements Resolver foreach ($reason->getReasons() as $reason) { $reasons []= $reason->getMessage(); } - $error .= " (".implode(", ", $reasons).")"; + $error .= " (".\implode(", ", $reasons).")"; } $errors[] = $error; } @@ -263,7 +263,7 @@ final class Rfc8484StubResolver implements Resolver $attemptDescription = []; $exceptions = []; - + while ($attempt < $attempts) { try { $attemptDescription[] = $nameserver; From 5a2981d2b6843bf482ae277490b5b3b4c3dbf362 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 13 Dec 2019 02:39:56 +0100 Subject: [PATCH 2/3] update --- .travis.yml | 4 ++-- composer.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2e811e7..e6f8615 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ sudo: false language: php php: - - 7.2 - - 7.3 +# - 7.2 +# - 7.3 - 7.4 - nightly diff --git a/composer.json b/composer.json index fe3876c..9ed247e 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "danog/libdns-json": "^0.1", "daverandom/libdns": "^2.0.1", "amphp/amp": "^2", - "amphp/http-client": "4.0-rc10", + "amphp/http-client": "4.0-rc11", "amphp/dns": "dev-master as v0.9.x-dev", "ext-filter": "*", "ext-json": "*" From 968175e0868a122ee2d2fa72eb545ebe48267d47 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sat, 14 Dec 2019 00:49:11 +0100 Subject: [PATCH 3/3] Hjelp --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 9ed247e..056137c 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,7 @@ "danog/libdns-json": "^0.1", "daverandom/libdns": "^2.0.1", "amphp/amp": "^2", - "amphp/http-client": "4.0-rc11", + "amphp/http-client": "dev-master as 4.0-rc11", "amphp/dns": "dev-master as v0.9.x-dev", "ext-filter": "*", "ext-json": "*"