mirror of
https://github.com/composer/composer
synced 2025-05-10 09:02:59 +00:00
Add message when doing composer outdated --direct and there is nothing to show, fixes #11152 (#11156)
This commit is contained in:
parent
ec82a1236d
commit
a63ce7cf96
2 changed files with 13 additions and 1 deletions
|
@ -615,7 +615,11 @@ EOT
|
|||
$io->writeError('Everything up to date');
|
||||
}
|
||||
} else {
|
||||
$this->printPackages($io, $packages, $indent, $versionFits, $latestFits, $descriptionFits, $width, $versionLength, $nameLength, $latestLength);
|
||||
if ($writeLatest && \count($packages) === 0) {
|
||||
$io->writeError('All your direct dependencies are up to date');
|
||||
} else {
|
||||
$this->printPackages($io, $packages, $indent, $versionFits, $latestFits, $descriptionFits, $width, $versionLength, $nameLength, $latestLength);
|
||||
}
|
||||
}
|
||||
|
||||
if ($showAllTypes) {
|
||||
|
|
|
@ -123,6 +123,14 @@ outdated/major 1.0.0 ~ 2.0.0',
|
|||
],
|
||||
];
|
||||
|
||||
yield 'outdated deps with --direct show msg if all up to date' => [
|
||||
['command' => 'outdated', '--direct' => true],
|
||||
'All your direct dependencies are up to date',
|
||||
[
|
||||
'vendor/package' => '*',
|
||||
],
|
||||
];
|
||||
|
||||
yield 'outdated deps with --major-only only shows major updates' => [
|
||||
['command' => 'outdated', '--major-only' => true],
|
||||
'Legend:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue