Merge remote-tracking branch 'stof/fix_show_columns' into 1.6
commit
785aba9d82
|
@ -329,23 +329,17 @@ EOT
|
||||||
ksort($packages[$type]);
|
ksort($packages[$type]);
|
||||||
|
|
||||||
$nameLength = $versionLength = $latestLength = 0;
|
$nameLength = $versionLength = $latestLength = 0;
|
||||||
foreach ($packages[$type] as $package) {
|
|
||||||
if (is_object($package)) {
|
|
||||||
$nameLength = max($nameLength, strlen($package->getPrettyName()));
|
|
||||||
if ($showVersion) {
|
|
||||||
$versionLength = max($versionLength, strlen($package->getFullPrettyVersion()));
|
|
||||||
if ($showLatest) {
|
|
||||||
$latestPackage = $this->findLatestPackage($package, $composer, $phpVersion, $showMinorOnly);
|
|
||||||
if ($latestPackage === false) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$latestPackages[$package->getPrettyName()] = $latestPackage;
|
if ($showLatest && $showVersion) {
|
||||||
$latestLength = max($latestLength, strlen($latestPackage->getFullPrettyVersion()));
|
foreach ($packages[$type] as $package) {
|
||||||
|
if (is_object($package)) {
|
||||||
|
$latestPackage = $this->findLatestPackage($package, $composer, $phpVersion, $showMinorOnly);
|
||||||
|
if ($latestPackage === false) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$latestPackages[$package->getPrettyName()] = $latestPackage;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
$nameLength = max($nameLength, strlen($package));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -357,11 +351,6 @@ EOT
|
||||||
$hasOutdatedPackages = false;
|
$hasOutdatedPackages = false;
|
||||||
|
|
||||||
$viewData[$type] = array();
|
$viewData[$type] = array();
|
||||||
$viewMetaData[$type] = array(
|
|
||||||
'nameLength' => $nameLength,
|
|
||||||
'versionLength' => $versionLength,
|
|
||||||
'latestLength' => $latestLength,
|
|
||||||
);
|
|
||||||
foreach ($packages[$type] as $package) {
|
foreach ($packages[$type] as $package) {
|
||||||
$packageViewData = array();
|
$packageViewData = array();
|
||||||
if (is_object($package)) {
|
if (is_object($package)) {
|
||||||
|
@ -376,12 +365,15 @@ EOT
|
||||||
}
|
}
|
||||||
|
|
||||||
$packageViewData['name'] = $package->getPrettyName();
|
$packageViewData['name'] = $package->getPrettyName();
|
||||||
|
$nameLength = max($nameLength, strlen($package->getPrettyName()));
|
||||||
if ($writeVersion) {
|
if ($writeVersion) {
|
||||||
$packageViewData['version'] = $package->getFullPrettyVersion();
|
$packageViewData['version'] = $package->getFullPrettyVersion();
|
||||||
|
$versionLength = max($versionLength, strlen($package->getFullPrettyVersion()));
|
||||||
}
|
}
|
||||||
if ($writeLatest && $latestPackage) {
|
if ($writeLatest && $latestPackage) {
|
||||||
$packageViewData['latest'] = $latestPackage->getFullPrettyVersion();
|
$packageViewData['latest'] = $latestPackage->getFullPrettyVersion();
|
||||||
$packageViewData['latest-status'] = $this->getUpdateStatus($latestPackage, $package);
|
$packageViewData['latest-status'] = $this->getUpdateStatus($latestPackage, $package);
|
||||||
|
$latestLength = max($latestLength, strlen($latestPackage->getFullPrettyVersion()));
|
||||||
}
|
}
|
||||||
if ($writeDescription) {
|
if ($writeDescription) {
|
||||||
$packageViewData['description'] = $package->getDescription();
|
$packageViewData['description'] = $package->getDescription();
|
||||||
|
@ -403,9 +395,15 @@ EOT
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$packageViewData['name'] = $package;
|
$packageViewData['name'] = $package;
|
||||||
|
$nameLength = max($nameLength, strlen($package));
|
||||||
}
|
}
|
||||||
$viewData[$type][] = $packageViewData;
|
$viewData[$type][] = $packageViewData;
|
||||||
}
|
}
|
||||||
|
$viewMetaData[$type] = array(
|
||||||
|
'nameLength' => $nameLength,
|
||||||
|
'versionLength' => $versionLength,
|
||||||
|
'latestLength' => $latestLength,
|
||||||
|
);
|
||||||
if ($input->getOption('strict') && $hasOutdatedPackages) {
|
if ($input->getOption('strict') && $hasOutdatedPackages) {
|
||||||
$exitCode = 1;
|
$exitCode = 1;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue