Add message when doing composer outdated --direct and there is nothing to show, fixes #11152 (#11156)
parent
ec82a1236d
commit
a63ce7cf96
|
@ -614,9 +614,13 @@ EOT
|
||||||
} else {
|
} else {
|
||||||
$io->writeError('Everything up to date');
|
$io->writeError('Everything up to date');
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if ($writeLatest && \count($packages) === 0) {
|
||||||
|
$io->writeError('All your direct dependencies are up to date');
|
||||||
} else {
|
} else {
|
||||||
$this->printPackages($io, $packages, $indent, $versionFits, $latestFits, $descriptionFits, $width, $versionLength, $nameLength, $latestLength);
|
$this->printPackages($io, $packages, $indent, $versionFits, $latestFits, $descriptionFits, $width, $versionLength, $nameLength, $latestLength);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ($showAllTypes) {
|
if ($showAllTypes) {
|
||||||
$io->write('');
|
$io->write('');
|
||||||
|
|
|
@ -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' => [
|
yield 'outdated deps with --major-only only shows major updates' => [
|
||||||
['command' => 'outdated', '--major-only' => true],
|
['command' => 'outdated', '--major-only' => true],
|
||||||
'Legend:
|
'Legend:
|
||||||
|
|
Loading…
Reference in New Issue