1
0
Fork 0

Add message when doing composer outdated --direct and there is nothing to show, fixes #11152 (#11156)

pull/11158/head
Jordi Boggiano 2022-10-27 16:21:53 +02:00 committed by GitHub
parent ec82a1236d
commit a63ce7cf96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View File

@ -614,9 +614,13 @@ EOT
} else {
$io->writeError('Everything up to date');
}
} else {
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) {
$io->write('');

View File

@ -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: