|
@@ -51,6 +51,11 @@ class FilesystemRepository extends WritableArrayRepository
|
|
try {
|
|
try {
|
|
$packages = $this->file->read();
|
|
$packages = $this->file->read();
|
|
|
|
|
|
|
|
+ // forward compatibility for composer v2 installed.json
|
|
|
|
+ if (isset($packages['packages'])) {
|
|
|
|
+ $packages = $packages['packages'];
|
|
|
|
+ }
|
|
|
|
+
|
|
if (!is_array($packages)) {
|
|
if (!is_array($packages)) {
|
|
throw new \UnexpectedValueException('Could not parse package list from the repository');
|
|
throw new \UnexpectedValueException('Could not parse package list from the repository');
|
|
}
|
|
}
|