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

Commit 0045ee6

Browse files
committed
bug #166 silence wrong exception (xabbuh)
This PR was merged into the 1.0-dev branch. Discussion ---------- silence wrong exception This fixes #163 by silencing the mistakenly thrown exception. Commits ------- e70acbd silence wrong exception
2 parents ea13aa5 + e70acbd commit 0045ee6

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/Symfony/Installer/DownloadCommand.php

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
use Symfony\Component\Console\Input\InputInterface;
2626
use Symfony\Component\Console\Output\OutputInterface;
2727
use Symfony\Component\Filesystem\Filesystem;
28+
use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException;
2829
use Symfony\Installer\Exception\AbortException;
2930

3031
/**
@@ -251,13 +252,17 @@ protected function extract()
251252
*/
252253
protected function checkSymfonyRequirements()
253254
{
254-
require $this->projectDir.'/app/SymfonyRequirements.php';
255-
$symfonyRequirements = new \SymfonyRequirements();
256-
$this->requirementsErrors = array();
257-
foreach ($symfonyRequirements->getRequirements() as $req) {
258-
if ($helpText = $this->getErrorMessage($req)) {
259-
$this->requirementsErrors[] = $helpText;
255+
try {
256+
require $this->projectDir.'/app/SymfonyRequirements.php';
257+
$symfonyRequirements = new \SymfonyRequirements();
258+
$this->requirementsErrors = array();
259+
foreach ($symfonyRequirements->getRequirements() as $req) {
260+
if ($helpText = $this->getErrorMessage($req)) {
261+
$this->requirementsErrors[] = $helpText;
262+
}
260263
}
264+
} catch (MethodArgumentValueNotImplementedException $e) {
265+
// workaround https://github.com/symfony/symfony-installer/issues/163
261266
}
262267

263268
return $this;

0 commit comments

Comments
 (0)