1
0
Fork 0

Only show override description if there is one, refs #7011

pull/7032/merge
Jordi Boggiano 2018-01-24 09:02:51 +01:00
parent fa5a94143a
commit 766ed9555e
1 changed files with 8 additions and 5 deletions

View File

@ -91,14 +91,17 @@ class Problem
// handle php/hhvm // handle php/hhvm
if ($job['packageName'] === 'php' || $job['packageName'] === 'php-64bit' || $job['packageName'] === 'hhvm') { if ($job['packageName'] === 'php' || $job['packageName'] === 'php-64bit' || $job['packageName'] === 'hhvm') {
$version = phpversion();
$available = $this->pool->whatProvides($job['packageName']); $available = $this->pool->whatProvides($job['packageName']);
$firstAvailable = reset($available);
$version = count($available) ? $firstAvailable->getPrettyVersion() : phpversion(); if (count($available)) {
if (count($available) && $firstAvailable instanceof CompletePackageInterface) { $firstAvailable = reset($available);
$version = $firstAvailable->getPrettyVersion();
$extra = $firstAvailable->getExtra();
if ($firstAvailable instanceof CompletePackageInterface && isset($extra['config.platform']) && $extra['config.platform'] === true) {
$version .= '; ' . $firstAvailable->getDescription(); $version .= '; ' . $firstAvailable->getDescription();
} }
}
$msg = "\n - This package requires ".$job['packageName'].$this->constraintToText($job['constraint']).' but '; $msg = "\n - This package requires ".$job['packageName'].$this->constraintToText($job['constraint']).' but ';