Skip to content

Commit

Permalink
Use precalculated information
Browse files Browse the repository at this point in the history
  • Loading branch information
Toflar committed May 8, 2024
1 parent 2fe3244 commit 3622076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Composer/DependencyResolver/DefaultPolicy.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function versionCompare(PackageInterface $a, PackageInterface $b, string
}

// dev versions need to be compared as branches via matchSpecific's special treatment, the rest can be optimized with compiling matcher
if (strpos($a->getVersion(), 'dev-') === 0 || strpos($b->getVersion(), 'dev-') === 0) {
if ($a->isDev() || $b->isDev()) {
$constraint = new Constraint($operator, $b->getVersion());
$version = new Constraint('==', $a->getVersion());

Expand Down

0 comments on commit 3622076

Please sign in to comment.