Skip to content

Commit

Permalink
bug #1003 Decouple psr-http-message-bridge from extra.symfony.require…
Browse files Browse the repository at this point in the history
… for versions before 6.4 (nicolas-grekas)

This PR was merged into the 1.x branch.

Discussion
----------

Decouple psr-http-message-bridge from extra.symfony.require for versions before 6.4

Should fix issues like getsentry/sentry-symfony#750 and symfony/recipes#1236

Before 6.4, the bridge was not in `symfony/symfony` so that `extra.symfony.require` shouldn't apply to earlier versions.

We *could* improve the API and flex to handle this concern at a more generic level, but this is so rare that I suggest hard-coding the rule in flex.

Commits
-------

42276be Decouple psr-http-message-bridge from extra.symfony.require for versions before 6.4
  • Loading branch information
nicolas-grekas committed Oct 30, 2023
2 parents 7c25be3 + 42276be commit f1cf401
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public function removeLegacyTags(array $data): array
continue;
}

if ('symfony/psr-http-message-bridge' === $name && 6.4 > $normalizedVersion) {
continue;
}

$constraint = new Constraint('==', $normalizedVersion);

if ($rootConstraint && $rootConstraint->matches($constraint)) {
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 f1cf401

Please sign in to comment.