Skip to content

Commit

Permalink
Add forward compatibility for upcoming v2 installed.json format, refs #…
Browse files Browse the repository at this point in the history
  • Loading branch information
Seldaek committed Feb 21, 2019
1 parent 61cd866 commit ba346ef
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Composer/Repository/FilesystemRepository.php
Expand Up @@ -51,6 +51,11 @@ protected function initialize()
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');
}
Expand Down

0 comments on commit ba346ef

Please sign in to comment.