diff --git a/src/Composer/Command/LicensesCommand.php b/src/Composer/Command/LicensesCommand.php index 9140aa48d..ce1e3a390 100644 --- a/src/Composer/Command/LicensesCommand.php +++ b/src/Composer/Command/LicensesCommand.php @@ -123,6 +123,9 @@ EOT $usedLicenses[$licenseName]++; } + // Sort licenses so that the most used license will appear first + arsort($dependencies, SORT_NUMERIC); + $rows = array(); foreach ($usedLicenses as $usedLicense => $numberOfDependencies) { $rows[] = array($usedLicense, $numberOfDependencies);