Skip to content

Commit

Permalink
Compatibility with Composer v2 installed.json file format
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Jan 20, 2020
1 parent 87a71c3 commit 7c0fdfe
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public function create(string $installationPath): ?SourceLocator
$composer = Json::decode($composerJsonContents, Json::FORCE_ARRAY);

$installedJsonContents = FileReader::read($installedJsonPath);
$installed = Json::decode($installedJsonContents, Json::FORCE_ARRAY);
$installedJson = Json::decode($installedJsonContents, Json::FORCE_ARRAY);
$installed = $installedJson['packages'] ?? $installedJson;

$classMapPaths = array_merge(
$this->prefixPaths($this->packageToClassMapPaths($composer), $installationPath . '/'),
Expand Down

0 comments on commit 7c0fdfe

Please sign in to comment.