Make sure the abandoned state is copied over even if the packages are installed already
parent
6c94cb89d1
commit
ac75680b1e
|
@ -1090,6 +1090,10 @@ class Installer
|
|||
$newSourceUrl = $newPackage->getSourceUrl();
|
||||
|
||||
$this->updatePackageUrl($package, $newSourceUrl, $newPackage->getSourceType(), $newPackage->getSourceReference(), $newPackage->getDistUrl());
|
||||
|
||||
if ($package instanceof CompletePackage && $newPackage instanceof CompletePackage) {
|
||||
$package->setAbandoned($newPackage->getReplacementPackage() ?: $newPackage->isAbandoned());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
--TEST--
|
||||
Update updates the outdated state of packages
|
||||
--COMPOSER--
|
||||
{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": [
|
||||
{
|
||||
"name": "a/a", "version": "1.0.0", "abandoned": "replacement"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"a/a": "1.0.0"
|
||||
}
|
||||
}
|
||||
--INSTALLED--
|
||||
[
|
||||
{
|
||||
"name": "a/a", "version": "1.0.0"
|
||||
}
|
||||
]
|
||||
--EXPECT-LOCK--
|
||||
{
|
||||
"packages": [
|
||||
{
|
||||
"name": "a/a", "version": "1.0.0",
|
||||
"type": "library",
|
||||
"abandoned": "replacement"
|
||||
}
|
||||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": [],
|
||||
"platform-dev": []
|
||||
}
|
||||
--RUN--
|
||||
update
|
||||
--EXPECT--
|
Loading…
Reference in New Issue