Skip to content
Snippets Groups Projects
Commit da55f419 authored by Ted Bowman's avatar Ted Bowman
Browse files

Revert: make getMostRecentReleaseInMinor() public

parent c25c1660
No related branches found
No related tags found
No related merge requests found
......@@ -151,14 +151,13 @@ final class UpdaterForm extends FormBase {
];
$project_info = new ProjectInfo('drupal');
$installed_version = ExtensionVersion::createFromVersionString($project_info->getInstalledVersion());
try {
// @todo Until https://www.drupal.org/i/3264849 is fixed, we can only show
// one release on the form. First, try to show the latest release in the
// currently installed minor. Failing that, try to show the latest
// release in the next minor.
$installed_minor_release = $this->releaseChooser->getMostRecentReleaseInMinor($this->updater, $project_info->getInstalledVersion());
$next_minor_release = $this->releaseChooser->getMostRecentReleaseInMinor($this->updater, $installed_version->getMajorVersion() . '.' . (((int) $installed_version->getMinorVersion()) + 1) . '.0');
$installed_minor_release = $this->releaseChooser->getLatestInInstalledMinor($this->updater);
$next_minor_release = $this->releaseChooser->getLatestInNextMinor($this->updater);
}
catch (\RuntimeException $e) {
$form['message'] = [
......
......@@ -74,7 +74,7 @@ class ReleaseChooser {
* @throws \InvalidArgumentException
* If the given semantic version number does not contain a patch version.
*/
public function getMostRecentReleaseInMinor(Updater $updater, string $version): ?ProjectRelease {
protected function getMostRecentReleaseInMinor(Updater $updater, string $version): ?ProjectRelease {
if (static::getPatchVersion($version) === NULL) {
throw new \InvalidArgumentException("The version number $version does not contain a patch version");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment