Skip to content

Commit

Permalink
removed non-implemented feature
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Dec 16, 2018
1 parent 4a7cd6d commit c9048c3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
3 changes: 0 additions & 3 deletions src/Downloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,6 @@ public function getRecipes(array $operations): array
foreach ($body['manifests'] as $name => $manifest) {
$data['manifests'][$name] = $manifest;
}
foreach ($body['vulnerabilities'] as $name => $vulns) {
$data['vulnerabilities'][$name] = $vulns;
}
foreach ($body['locks'] ?? [] as $name => $lock) {
$data['locks'][$name] = $lock;
}
Expand Down
14 changes: 3 additions & 11 deletions src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -298,15 +298,7 @@ public function update(Event $event, $operations = [])
copy(getcwd().'/.env.dist', getcwd().'/.env');
}

list($recipes, $vulnerabilities) = $this->fetchRecipes();
if ($vulnerabilities) {
$this->io->writeError(sprintf('<info>Vulnerabilities: %d package%s</>', \count($vulnerabilities), \count($recipes) > 1 ? 's' : ''));
}
foreach ($vulnerabilities as $name => $vulns) {
foreach ($vulns as $v) {
$this->io->writeError(sprintf(' - <error>Vulnerability on %s</>: %s', $name, $v));
}
}
$recipes = $this->fetchRecipes();

if (2 === $this->displayThanksReminder) {
$love = '\\' === \DIRECTORY_SEPARATOR ? 'love' : '💖 ';
Expand Down Expand Up @@ -573,7 +565,7 @@ private function fetchRecipes(): array
if (null === $this->downloader->getEndpoint()) {
$this->io->writeError('<warning>Symfony recipes are disabled: "symfony/flex" not found in the root composer.json</warning>');

return [[], []];
return [];
}
$devPackages = null;
$data = $this->downloader->getRecipes($this->operations);
Expand Down Expand Up @@ -624,7 +616,7 @@ private function fetchRecipes(): array
}
$this->operations = [];

return [array_filter($recipes), $data['vulnerabilities'] ?? []];
return array_filter($recipes);
}

private function initOptions(): Options
Expand Down
1 change: 0 additions & 1 deletion tests/FlexTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public function testPostInstall()
'origin' => 'dummy/dummy:[email protected]/symfony/recipes:master',
],
],
'vulnerabilities' => [],
];

$configurator = $this->getMockBuilder(Configurator::class)->disableOriginalConstructor()->getMock();
Expand Down

0 comments on commit c9048c3

Please sign in to comment.