Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Intercept and customize error from Guzzle #226

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion 11 src/Symfony/Installer/DownloadCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Event\ProgressEvent;
use GuzzleHttp\Utils;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -221,7 +222,15 @@ protected function getGuzzleClient()
$defaults['debug'] = true;
}

return new Client(array('defaults' => $defaults));
try {
$handler = Utils::getDefaultHandler();
} catch (\RuntimeException $e) {
throw new \RuntimeException(
'The Symfony installer requires the php-curl extension or the allow_url_fopen ini setting.'
);
}

return new Client(array('defaults' => $defaults, 'handler' => $handler));
}

/**
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.