Add forward compatibility for upcoming v2 installed.json format, refs #7999
parent
61cd8664e5
commit
ba346ef04d
|
@ -51,6 +51,11 @@ class FilesystemRepository extends WritableArrayRepository
|
|||
try {
|
||||
$packages = $this->file->read();
|
||||
|
||||
// forward compatibility for composer v2 installed.json
|
||||
if (isset($packages['packages'])) {
|
||||
$packages = $packages['packages'];
|
||||
}
|
||||
|
||||
if (!is_array($packages)) {
|
||||
throw new \UnexpectedValueException('Could not parse package list from the repository');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue