1
0
Fork 0

Merge branch '2.7'

pull/12086/head
Jordi Boggiano 2024-09-18 11:00:51 +02:00
commit 8bc8c4383a
No known key found for this signature in database
2 changed files with 8 additions and 0 deletions

View File

@ -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);

View File

@ -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);