Skip to content
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

Merged

Conversation

AlessandroMinoccheri
Copy link
Contributor

No description provided.

Copy link
Member

@sagikazarmark sagikazarmark left a 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?

@@ -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(
Copy link
Member

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
);

}
$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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

@AlessandroMinoccheri
Copy link
Contributor Author

Yeah, you are right, I have corrected the lines commented!

@sagikazarmark
Copy link
Member

Great, thanks a lot!

@sagikazarmark sagikazarmark merged commit 0773d44 into guzzle:master Apr 23, 2018
@wirwolf
Copy link

wirwolf commented Oct 18, 2019

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

  • replace "guzzlehttp/guzzle": "^6.3" to "someblackmagic/guzzle": "^6.4"
  • add "guzzlehttp/guzzle": "6.3.*" into replace block in your composer.json

Fork link: https://github.com/SomeBlackMagic/guzzle/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants