Skip to content
This repository was archived by the owner on Nov 14, 2019. It is now read-only.

Commit daa5232

Browse files
committed
feature #177 Added support for debuging the request performed by Guzzle (javiereguiluz)
This PR was squashed before being merged into the 1.0-dev branch (closes #177). Discussion ---------- Added support for debuging the request performed by Guzzle This is useful to spot connection issues for bugs such as #92. Commits ------- 716a98e Added support for debuging the request performed by Guzzle
2 parents 9638151 + 716a98e commit daa5232

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Symfony/Installer/DownloadCommand.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,15 +181,19 @@ protected function checkProjectName()
181181
*/
182182
protected function getGuzzleClient()
183183
{
184-
$options = array();
184+
$defaults = array();
185185

186186
// check if the client must use a proxy server
187187
if (!empty($_SERVER['HTTP_PROXY']) || !empty($_SERVER['http_proxy'])) {
188188
$proxy = !empty($_SERVER['http_proxy']) ? $_SERVER['http_proxy'] : $_SERVER['HTTP_PROXY'];
189-
$options['proxy'] = $proxy;
189+
$defaults['proxy'] = $proxy;
190190
}
191191

192-
return new Client($options);
192+
if ($this->output->getVerbosity() >= OutputInterface::VERBOSITY_DEBUG) {
193+
$defaults['debug'] = true;
194+
}
195+
196+
return new Client(array('defaults' => $defaults));
193197
}
194198

195199
/**

0 commit comments

Comments
 (0)