1
0
Fork 0

Report "same as actual" version if override package matches actual

pull/7762/head
Raffael Comi 2018-10-15 13:41:59 +02:00 committed by Jordi Boggiano
parent 41458c7518
commit 3c543b2752
1 changed files with 12 additions and 2 deletions

View File

@ -236,7 +236,12 @@ class PlatformRepository extends ArrayRepository
// Skip if overridden
if (isset($this->overrides[$package->getName()])) {
$overrider = $this->findPackage($package->getName(), '*');
$overrider->setDescription($overrider->getDescription().' (actual: '.$package->getPrettyVersion().')');
if ($package->getVersion() === $overrider->getVersion()) {
$actualText = 'same as actual';
} else {
$actualText = 'actual: '.$package->getPrettyVersion();
}
$overrider->setDescription($overrider->getDescription().' ('.$actualText.')');
return;
}
@ -244,7 +249,12 @@ class PlatformRepository extends ArrayRepository
// Skip if PHP is overridden and we are adding a php-* package
if (isset($this->overrides['php']) && 0 === strpos($package->getName(), 'php-')) {
$overrider = $this->addOverriddenPackage($this->overrides['php'], $package->getPrettyName());
$overrider->setDescription($overrider->getDescription().' (actual: '.$package->getPrettyVersion().')');
if ($package->getVersion() === $overrider->getVersion()) {
$actualText = 'same as actual';
} else {
$actualText = 'actual: '.$package->getPrettyVersion();
}
$overrider->setDescription($overrider->getDescription().' ('.$actualText.')');
return;
}