This commit is contained in:
Daniel Hensby 2018-03-07 13:06:42 +00:00
parent d8f9f31b71
commit a9ad0bb90a
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
1 changed files with 3 additions and 1 deletions

View File

@ -97,11 +97,13 @@ class RecipeInstaller extends LibraryInstaller {
// If any files are written, modify composer.json with newly installed files
if ($installedFiles) {
sort($installedFiles);
$composerFile = $this->getComposerFile();
$composerData = $composerFile->read();
if (!isset($composerData['extra'])) {
$composerData['extra'] = [];
}
$composerData['extra'][$registrationKey] = $installedFiles;
$this->getComposerFile()->write($composerData);
$composerFile->write($composerData);
}
}