Skip to content
Snippets Groups Projects
Commit 1f509610 authored by Shabbir Reshamwala's avatar Shabbir Reshamwala Committed by Ted Bowman
Browse files

Issue #3310696 by tedbow, Shabbir, omkar.podey: if only newer releases are...

Issue #3310696 by tedbow, Shabbir, omkar.podey: if only newer releases are pre-releases Updating from one minor to latest version Drupal version, module does not show any other updates
parent 52084905
No related branches found
No related tags found
No related merge requests found
......@@ -108,18 +108,10 @@ final class ProjectInfo {
}
$installed_version = $this->getInstalledVersion();
if ($installed_version) {
// If the project is installed, and we're already up-to-date, there's
// nothing else we need to do.
if ($project['status'] === UpdateManagerInterface::CURRENT) {
return [];
}
if (empty($available_updates['releases'])) {
// If project is installed but not current we should always have at
// least one release.
throw new \RuntimeException('There was a problem getting update information. Try again later.');
}
if ($installed_version && empty($available_updates['releases'])) {
// If project is installed but not current we should always have at
// least one release.
throw new \RuntimeException('There was a problem getting update information. Try again later.');
}
$support_branches = explode(',', $available_updates['supported_branches']);
......
<?xml version="1.0" encoding="utf-8"?>
<!--
Contains metadata about the following (fake) releases of Drupal core, all of which are secure, in order:
* 9.8.0-alpha1
* 9.7.1
* 9.7.0
-->
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Drupal</title>
<short_name>drupal</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>9.7.,9.8.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/drupal</link>
<terms>
<term>
<name>Projects</name>
<value>Drupal project</value>
</term>
</terms>
<releases>
<release>
<name>Drupal 9.8.0-alpha1</name>
<version>9.8.0-alpha1</version>
<status>published</status>
<release_link>http://example.com/drupal-9-8-0-alpha1-release</release_link>
<download_link>http://example.com/drupal-9-8-0-alpha1.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term>
<name>Release type</name>
<value>New features</value>
</term>
<term>
<name>Release type</name>
<value>Bug fixes</value>
</term>
</terms>
</release>
<release>
<name>Drupal 9.7.1</name>
<version>9.7.1</version>
<status>published</status>
<release_link>http://example.com/drupal-9-7-1-release</release_link>
<download_link>http://example.com/drupal-9-7-1.tar.gz</download_link>
<date>1250425521</date>
<terms>
<term>
<name>Release type</name>
<value>New features</value>
</term>
<term>
<name>Release type</name>
<value>Bug fixes</value>
</term>
</terms>
</release>
<release>
<name>Drupal 9.7.0</name>
<version>9.7.0</version>
<status>published</status>
<release_link>http://example.com/drupal-9-7-0-release</release_link>
<download_link>http://example.com/drupal-9-7-0.tar.gz</download_link>
<date>1250424521</date>
<terms>
<term>
<name>Release type</name>
<value>New features</value>
</term>
<term>
<name>Release type</name>
<value>Bug fixes</value>
</term>
</terms>
</release>
</releases>
</project>
......@@ -67,6 +67,11 @@ class ProjectInfoTest extends PackageManagerKernelTestBase {
'9.8.2',
[],
],
'core, on supported branch, pre-release in next minor' => [
'drupal.9.8.0-alpha1.xml',
'9.7.1',
['9.8.0-alpha1'],
],
'core, on unsupported branch, updates in multiple supported branches' => [
'drupal.9.8.2.xml',
'9.6.0-alpha1',
......
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