Skip to content

Commit

Permalink
bug #968 Fix keeping platform requirements when rebooting composer (n…
Browse files Browse the repository at this point in the history
…icolas-grekas)

This PR was merged into the 1.x branch.

Discussion
----------

Fix keeping platform requirements when rebooting composer

Commits
-------

9aca8f3 Fix keeping platform requirements when rebooting composer
  • Loading branch information
nicolas-grekas committed Oct 30, 2023
2 parents 7c191ea + 9aca8f3 commit 7c25be3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Flex.php
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,9 @@ private function reinstall(Event $event, bool $update)
$composer->getEventDispatcher(),
$composer->getAutoloadGenerator()
);
if (method_exists($installer, 'setPlatformRequirementFilter')) {
$installer->setPlatformRequirementFilter(((array) $this->installer)["\0*\0platformRequirementFilter"]);
}

if (!$update && method_exists($installer, 'setUpdateAllowList')) {
$installer->setUpdateAllowList(['php']);
Expand Down

0 comments on commit 7c25be3

Please sign in to comment.