Add message when doing composer outdated --direct and there is nothing to show, fixes #11152 (#11156)
parent
ec82a1236d
commit
a63ce7cf96
|
@ -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…
Reference in New Issue