diff --git a/src/Composer/Repository/FilesystemRepository.php b/src/Composer/Repository/FilesystemRepository.php index bde55aad3..204aa095d 100644 --- a/src/Composer/Repository/FilesystemRepository.php +++ b/src/Composer/Repository/FilesystemRepository.php @@ -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'); }