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