1
0
Fork 0

Attempt fixing handling of root aliases when composer 1 reads composer 2 lock files, fixes #9337

pull/9347/head
Jordi Boggiano 2020-10-25 12:42:35 +01:00
parent 6f79163a2a
commit 8925b4f596
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
1 changed files with 11 additions and 1 deletions

View File

@ -254,7 +254,17 @@ class Locker
{ {
$lockData = $this->getLockData(); $lockData = $this->getLockData();
return isset($lockData['aliases']) ? $lockData['aliases'] : array(); if (!isset($lockData['aliases'])) {
return array();
}
foreach ($lockData['aliases'] as $index => $alias) {
if (in_array($alias['version'], array('dev-master', 'dev-default', 'dev-trunk'), true)) {
$lockData['aliases'][$index]['version'] = '9999999-dev';
}
}
return $lockData['aliases'];
} }
public function getLockData() public function getLockData()