pull/12086/head
parent
c2b1667cac
commit
07248f4323
|
@ -561,10 +561,16 @@ EOT
|
||||||
}
|
}
|
||||||
$lockFile = Factory::getLockFile($this->json->getPath());
|
$lockFile = Factory::getLockFile($this->json->getPath());
|
||||||
if (file_exists($lockFile)) {
|
if (file_exists($lockFile)) {
|
||||||
|
$stabilityFlags = RootPackageLoader::extractStabilityFlags($requirements, $composer->getPackage()->getMinimumStability(), []);
|
||||||
|
|
||||||
$lockMtime = filemtime($lockFile);
|
$lockMtime = filemtime($lockFile);
|
||||||
$lock = new JsonFile($lockFile);
|
$lock = new JsonFile($lockFile);
|
||||||
$lockData = $lock->read();
|
$lockData = $lock->read();
|
||||||
$lockData['content-hash'] = Locker::getContentHash($contents);
|
$lockData['content-hash'] = Locker::getContentHash($contents);
|
||||||
|
foreach ($stabilityFlags as $packageName => $flag) {
|
||||||
|
$lockData['stability-flags'][$packageName] = $flag;
|
||||||
|
}
|
||||||
|
ksort($lockData['stability-flags']);
|
||||||
$lock->write($lockData);
|
$lock->write($lockData);
|
||||||
if (is_int($lockMtime)) {
|
if (is_int($lockMtime)) {
|
||||||
@touch($lockFile, $lockMtime);
|
@touch($lockFile, $lockMtime);
|
||||||
|
|
|
@ -373,6 +373,8 @@ class Locker
|
||||||
'prefer-lowest' => $preferLowest,
|
'prefer-lowest' => $preferLowest,
|
||||||
];
|
];
|
||||||
|
|
||||||
|
ksort($lock['stability-flags']);
|
||||||
|
|
||||||
$lock['packages'] = $this->lockPackages($packages);
|
$lock['packages'] = $this->lockPackages($packages);
|
||||||
if (null !== $devPackages) {
|
if (null !== $devPackages) {
|
||||||
$lock['packages-dev'] = $this->lockPackages($devPackages);
|
$lock['packages-dev'] = $this->lockPackages($devPackages);
|
||||||
|
|
Loading…
Reference in New Issue