Skip to content

Commit

Permalink
Merge branch '1.x' into 2.x
Browse files Browse the repository at this point in the history
* 1.x:
  Decouple psr-http-message-bridge from extra.symfony.require for versions before 6.4
  Fix keeping platform requirements when rebooting composer
  • Loading branch information
nicolas-grekas committed Oct 30, 2023
2 parents 24eb099 + f1cf401 commit ae6dea6
Show file tree
Hide file tree
Showing 2 changed files with 4 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 @@ -814,6 +814,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) {
$installer->setUpdateAllowList(['php']);
Expand Down
1 change: 1 addition & 0 deletions src/PackageFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public function removeLegacyPackages(array $data, RootPackageInterface $rootPack
!isset($knownVersions['splits'][$name])
|| array_intersect($versions, $lockedVersions[$name] ?? [])
|| (isset($rootConstraints[$name]) && !Intervals::haveIntersections($this->symfonyConstraints, $rootConstraints[$name]))
|| ('symfony/psr-http-message-bridge' === $name && 6.4 > $versions[0])
)) {
$filteredPackages[] = $package;
continue;
Expand Down

0 comments on commit ae6dea6

Please sign in to comment.