Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.1] updater contraintchecker stability check early return #43497

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions libraries/src/Updater/ConstraintChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,14 @@ public function check(array $candidate, $minimumStability = Updater::STABILITY_S
return false;
}

// Check stability, assume true when not set
if (
isset($candidate['stability'])
&& !$this->checkStability($candidate['stability'], $minimumStability)
) {
return false;
}

$result = true;

// Check php_minimum, assume true when not set
Expand All @@ -111,14 +119,6 @@ public function check(array $candidate, $minimumStability = Updater::STABILITY_S
$result = false;
}

// Check stability, assume true when not set
if (
isset($candidate['stability'])
&& !$this->checkStability($candidate['stability'], $minimumStability)
) {
$result = false;
}

return $result;
}

Expand Down