Skip to content

Commit f4b7b9a

Browse files
bug #696 Fix support for ".x" branches (nicolas-grekas)
This PR was merged into the 1.8-dev branch. Discussion ---------- Fix support for ".x" branches This also fixes support for branch `5.x` Commits ------- 0c662de Fix support for ".x" branches
2 parents e85edca + 0c662de commit f4b7b9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PackageFilter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,10 @@ private function getVersions(): array
9999
foreach ($vers as $i => $v) {
100100
if (!isset($okVersions[$v])) {
101101
$okVersions[$v] = false;
102+
$w = '.x' === substr($v, -2) ? $versions['next'] : $v;
102103

103104
for ($j = 0; $j < 60; ++$j) {
104-
if ($this->symfonyConstraints->matches(new Constraint('==', $v.'.'.$j.'.0'))) {
105+
if ($this->symfonyConstraints->matches(new Constraint('==', $w.'.'.$j.'.0'))) {
105106
$okVersions[$v] = true;
106107
break;
107108
}

0 commit comments

Comments
 (0)