From c9048c34ee54d6d10ba8c9ed8e3fb5087a2a56f8 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 16 Dec 2018 23:13:50 +0100 Subject: [PATCH] removed non-implemented feature --- src/Downloader.php | 3 --- src/Flex.php | 14 +++----------- tests/FlexTest.php | 1 - 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/src/Downloader.php b/src/Downloader.php index 31da8b912..73fc01f08 100644 --- a/src/Downloader.php +++ b/src/Downloader.php @@ -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; } diff --git a/src/Flex.php b/src/Flex.php index 6dfcfd42f..605330ce0 100644 --- a/src/Flex.php +++ b/src/Flex.php @@ -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('Vulnerabilities: %d package%s', \count($vulnerabilities), \count($recipes) > 1 ? 's' : '')); - } - foreach ($vulnerabilities as $name => $vulns) { - foreach ($vulns as $v) { - $this->io->writeError(sprintf(' - Vulnerability on %s: %s', $name, $v)); - } - } + $recipes = $this->fetchRecipes(); if (2 === $this->displayThanksReminder) { $love = '\\' === \DIRECTORY_SEPARATOR ? 'love' : '💖 '; @@ -573,7 +565,7 @@ private function fetchRecipes(): array if (null === $this->downloader->getEndpoint()) { $this->io->writeError('Symfony recipes are disabled: "symfony/flex" not found in the root composer.json'); - return [[], []]; + return []; } $devPackages = null; $data = $this->downloader->getRecipes($this->operations); @@ -624,7 +616,7 @@ private function fetchRecipes(): array } $this->operations = []; - return [array_filter($recipes), $data['vulnerabilities'] ?? []]; + return array_filter($recipes); } private function initOptions(): Options diff --git a/tests/FlexTest.php b/tests/FlexTest.php index 88172e5b6..325c9a06f 100644 --- a/tests/FlexTest.php +++ b/tests/FlexTest.php @@ -53,7 +53,6 @@ public function testPostInstall() 'origin' => 'dummy/dummy:1.0@github.com/symfony/recipes:master', ], ], - 'vulnerabilities' => [], ]; $configurator = $this->getMockBuilder(Configurator::class)->disableOriginalConstructor()->getMock();