Skip to content

Commit

Permalink
Enhancement: Continue early
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 25, 2023
1 parent 25bea93 commit 6d92b7b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Vendor/Composer/VersionConstraintNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,16 @@ private static function removeOverlappingConstraints(string $versionConstraint):
continue;
}

if (Semver\Semver::satisfies(\ltrim($b, '^~'), $a)) {
// Remove overlapping constraints
$hasChanged = true;
$orConstraints[$i + 1] = null;
$orConstraints = \array_values(\array_filter($orConstraints));

break;
if (!Semver\Semver::satisfies(\ltrim($b, '^~'), $a)) {
continue;
}

// Remove overlapping constraints
$hasChanged = true;
$orConstraints[$i + 1] = null;
$orConstraints = \array_values(\array_filter($orConstraints));

break;
}
} while ($hasChanged);

Expand Down

0 comments on commit 6d92b7b

Please sign in to comment.