Skip to content

Commit 174906b

Browse files
Fix needless call to flex API on composer i
1 parent 5f92875 commit 174906b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/PackageFilter.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function removeLegacyPackages(array $data, RootPackageInterface $rootPack
6565
$rootConstraints[$name] = $link->getConstraint();
6666
}
6767

68-
$knownVersions = $this->getVersions();
68+
$knownVersions = null;
6969
$filteredPackages = [];
7070
$symfonyPackages = [];
7171
$oneSymfony = false;
@@ -77,8 +77,8 @@ public function removeLegacyPackages(array $data, RootPackageInterface $rootPack
7777
}
7878

7979
if ('symfony/symfony' !== $name && (
80-
!isset($knownVersions['splits'][$name])
81-
|| array_intersect($versions, $lockedVersions[$name] ?? [])
80+
array_intersect($versions, $lockedVersions[$name] ?? [])
81+
|| (($knownVersions ??= $this->getVersions()) && !isset($knownVersions['splits'][$name]))
8282
|| (isset($rootConstraints[$name]) && !Intervals::haveIntersections($this->symfonyConstraints, $rootConstraints[$name]))
8383
|| ('symfony/psr-http-message-bridge' === $name && 6.4 > $versions[0])
8484
)) {

0 commit comments

Comments
 (0)