From ceb8bef778b98ae63e61ed688f8972aceb17c4fe Mon Sep 17 00:00:00 2001 From: Thomas Landauer Date: Sat, 20 Aug 2022 09:24:25 +0200 Subject: [PATCH] Adding hint what "Direct dependencies" means (#11013) --- src/Composer/Command/ShowCommand.php | 4 ++-- tests/Composer/Test/Command/ShowCommandTest.php | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Composer/Command/ShowCommand.php b/src/Composer/Command/ShowCommand.php index 7506113ce..eca2149ae 100644 --- a/src/Composer/Command/ShowCommand.php +++ b/src/Composer/Command/ShowCommand.php @@ -601,14 +601,14 @@ EOT } $io->write(''); - $io->write('Direct dependencies:'); + $io->write('Direct dependencies required in composer.json:'); if (\count($directDeps) > 0) { $this->printPackages($io, $directDeps, $indent, $versionFits, $latestFits, $descriptionFits, $width, $versionLength, $nameLength, $latestLength); } else { $io->write('Everything up to date'); } $io->write(''); - $io->write('Transitive dependencies:'); + $io->write('Transitive dependencies not required in composer.json:'); if (\count($transitiveDeps) > 0) { $this->printPackages($io, $transitiveDeps, $indent, $versionFits, $latestFits, $descriptionFits, $width, $versionLength, $nameLength, $latestLength); } else { diff --git a/tests/Composer/Test/Command/ShowCommandTest.php b/tests/Composer/Test/Command/ShowCommandTest.php index 9f44b3ce7..ea23fad11 100644 --- a/tests/Composer/Test/Command/ShowCommandTest.php +++ b/tests/Composer/Test/Command/ShowCommandTest.php @@ -102,10 +102,10 @@ vendor/package generic description', ! patch or minor release available - update recommended ~ major release available - update possible -Direct dependencies: +Direct dependencies required in composer.json: Everything up to date -Transitive dependencies: +Transitive dependencies not required in composer.json: outdated/major 1.0.0 ~ 2.0.0 outdated/minor 1.0.0 ! 1.1.1 outdated/patch 1.0.0 ! 1.0.1', @@ -129,10 +129,10 @@ outdated/major 1.0.0 ~ 2.0.0', ! patch or minor release available - update recommended ~ major release available - update possible -Direct dependencies: +Direct dependencies required in composer.json: Everything up to date -Transitive dependencies: +Transitive dependencies not required in composer.json: outdated/major 1.0.0 ~ 2.0.0', ]; @@ -142,10 +142,10 @@ outdated/major 1.0.0 ~ 2.0.0', ! patch or minor release available - update recommended ~ major release available - update possible -Direct dependencies: +Direct dependencies required in composer.json: outdated/minor 1.0.0 ! 1.1.1 -Transitive dependencies: +Transitive dependencies not required in composer.json: outdated/major 1.0.0 ! 1.1.1 outdated/patch 1.0.0 ! 1.0.1', ['outdated/minor' => '*'], @@ -157,10 +157,10 @@ outdated/patch 1.0.0 ! 1.0.1', ! patch or minor release available - update recommended ~ major release available - update possible -Direct dependencies: +Direct dependencies required in composer.json: Everything up to date -Transitive dependencies: +Transitive dependencies not required in composer.json: outdated/major 1.0.0 ! 1.0.1 outdated/minor 1.0.0 ! 1.0.1 outdated/patch 1.0.0 ! 1.0.1',