Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display "composer why" suggestion for every package #4406

Merged
merged 5 commits into from
May 12, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Commands/pm/SecurityUpdateCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ public function securityPhp($options = ['format' => 'yaml'])
$process->mustRun();
$out = $process->getOutput();
if ($packages = json_decode($out, true)) {
$suggested_command = "composer why " . key($packages);
$suggested_command = "composer why " . implode('; composer why ', array_keys($packages));
prudloff-insite marked this conversation as resolved.
Show resolved Hide resolved
$this->logger()->warning('One or more of your dependencies has an outstanding security update.');
$this->logger()->notice("Run <comment>$suggested_command</comment> to learn what module requires the package.");
return CommandResult::dataWithExitCode(new UnstructuredData($packages), self::EXIT_FAILURE);
Expand Down