-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split some long lines in many #2064
split some long lines in many #2064
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot. I had a few minor comments, can you please take a look at them?
src/Handler/StreamHandler.php
Outdated
@@ -343,13 +343,21 @@ private function resolveHost(RequestInterface $request, array $options) | |||
if ('v4' === $options['force_ip_resolve']) { | |||
$records = dns_get_record($uri->getHost(), DNS_A); | |||
if (!isset($records[0]['ip'])) { | |||
throw new ConnectException(sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request); | |||
throw new ConnectException(sprintf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
throw new ConnectException(
sprintf(
"Could not resolve IPv4 address for host '%s'",
$uri->getHost()
),
$request
);
src/Handler/StreamHandler.php
Outdated
} | ||
$uri = $uri->withHost($records[0]['ip']); | ||
} elseif ('v6' === $options['force_ip_resolve']) { | ||
$records = dns_get_record($uri->getHost(), DNS_AAAA); | ||
if (!isset($records[0]['ipv6'])) { | ||
throw new ConnectException(sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request); | ||
throw new ConnectException(sprintf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
ba1da4a
to
2e7aec0
Compare
Yeah, you are right, I have corrected the lines commented! |
Great, thanks a lot! |
Hello @AlessandroMinoccheri, i create a fork of this repo and release this changes into the new version(6.4.0). Namespace compatibility is 100%, and you can use my changes
Fork link: https://github.com/SomeBlackMagic/guzzle/ |
No description provided.