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

Issue #3307369 by kunal.sachdev, tedbow, phenaproxima: Validate all changed or...

Issue #3307369 by kunal.sachdev, tedbow, phenaproxima: Validate all changed or updated Drupal projects with Update XML
parent c2790b06
No related branches found
No related tags found
No related merge requests found
Showing
with 685 additions and 122 deletions
...@@ -6,7 +6,6 @@ use Drupal\package_manager\ProjectInfo; ...@@ -6,7 +6,6 @@ use Drupal\package_manager\ProjectInfo;
use Drupal\automatic_updates_extensions\ExtensionUpdater; use Drupal\automatic_updates_extensions\ExtensionUpdater;
use Drupal\package_manager\LegacyVersionUtility; use Drupal\package_manager\LegacyVersionUtility;
use Drupal\Core\StringTranslation\StringTranslationTrait; use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\package_manager\Event\PreApplyEvent;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
...@@ -63,43 +62,6 @@ final class UpdateReleaseValidator implements EventSubscriberInterface { ...@@ -63,43 +62,6 @@ final class UpdateReleaseValidator implements EventSubscriberInterface {
return FALSE; return FALSE;
} }
/**
* Checks that the packages are secure and supported.
*
* @param \Drupal\package_manager\Event\PreApplyEvent $event
* The event object.
*/
public function checkStagedReleases(PreApplyEvent $event): void {
$messages = [];
// Get packages that were installed and also updated in the staging area.
$active = $event->getStage()->getActiveComposer();
$staged = $event->getStage()->getStageComposer();
$updated_packages = $staged->getPackagesWithDifferentVersionsIn($active);
foreach ($updated_packages as $staged_package) {
if (!in_array($staged_package->getType(),
['drupal-module', 'drupal-theme'], TRUE)) {
continue;
}
$project_name = $staged->getProjectForPackage($staged_package->getName());
$semantic_version = $staged_package->getPrettyVersion();
if (!$this->isSupportedRelease($project_name, $semantic_version)) {
$messages[] = $this->t('Project @project_name to version @version', [
'@project_name' => $project_name,
'@version' => $semantic_version,
]);
}
}
if ($messages) {
$summary = $this->formatPlural(
count($messages),
'Cannot update because the following project version is not in the list of installable releases.',
'Cannot update because the following project versions are not in the list of installable releases.'
);
$event->addError($messages, $summary);
}
}
/** /**
* Checks that the update projects are secure and supported. * Checks that the update projects are secure and supported.
* *
...@@ -144,7 +106,6 @@ final class UpdateReleaseValidator implements EventSubscriberInterface { ...@@ -144,7 +106,6 @@ final class UpdateReleaseValidator implements EventSubscriberInterface {
public static function getSubscribedEvents() { public static function getSubscribedEvents() {
return [ return [
PreCreateEvent::class => 'checkRelease', PreCreateEvent::class => 'checkRelease',
PreApplyEvent::class => 'checkStagedReleases',
]; ];
} }
......
...@@ -19,7 +19,7 @@ abstract class AutomaticUpdatesExtensionsKernelTestBase extends AutomaticUpdates ...@@ -19,7 +19,7 @@ abstract class AutomaticUpdatesExtensionsKernelTestBase extends AutomaticUpdates
*/ */
protected static $modules = [ protected static $modules = [
'automatic_updates_extensions', 'automatic_updates_extensions',
'automatic_updates_test_release_history', 'package_manager_test_release_history',
]; ];
/** /**
......
...@@ -22,6 +22,7 @@ class PackagesInstalledWithComposerValidatorTest extends AutomaticUpdatesExtensi ...@@ -22,6 +22,7 @@ class PackagesInstalledWithComposerValidatorTest extends AutomaticUpdatesExtensi
// In this test, we don't care whether the updated projects are secure and // In this test, we don't care whether the updated projects are secure and
// supported. // supported.
$this->disableValidators[] = 'automatic_updates_extensions.validator.target_release'; $this->disableValidators[] = 'automatic_updates_extensions.validator.target_release';
$this->disableValidators[] = 'package_manager.validator.supported_releases';
// @todo The validator being tested covers the same cases as the following // @todo The validator being tested covers the same cases as the following
// validator. PackagesInstalledWithComposerValidatorTest will be removed // validator. PackagesInstalledWithComposerValidatorTest will be removed
// in https://drupal.org/i/3303900. // in https://drupal.org/i/3303900.
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
namespace Drupal\Tests\automatic_updates_extensions\Kernel\Validator; namespace Drupal\Tests\automatic_updates_extensions\Kernel\Validator;
use Drupal\package_manager\LegacyVersionUtility; use Drupal\package_manager\LegacyVersionUtility;
use Drupal\package_manager\Event\PreApplyEvent;
use Drupal\package_manager\Event\PreCreateEvent; use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\ValidationResult; use Drupal\package_manager\ValidationResult;
use Drupal\Tests\automatic_updates_extensions\Kernel\AutomaticUpdatesExtensionsKernelTestBase; use Drupal\Tests\automatic_updates_extensions\Kernel\AutomaticUpdatesExtensionsKernelTestBase;
...@@ -80,80 +79,4 @@ class UpdateReleaseValidatorTest extends AutomaticUpdatesExtensionsKernelTestBas ...@@ -80,80 +79,4 @@ class UpdateReleaseValidatorTest extends AutomaticUpdatesExtensionsKernelTestBas
$this->assertUpdateResults([$project => $target_version], $expected_results, PreCreateEvent::class); $this->assertUpdateResults([$project => $target_version], $expected_results, PreCreateEvent::class);
} }
/**
* Data provider for testPreApplyException().
*
* @return mixed[][]
* The test cases.
*/
public function providerTestPreApplyException(): array {
$fixtures_folder = __DIR__ . '/../../../fixtures/update_release_validator';
return [
'semver, supported update' => ['semver_test', '8.1.0', '8.1.1', "$fixtures_folder/semver_supported_update_stage", FALSE],
'semver, update to unsupported branch' => ['semver_test', '8.1.0', '8.2.0', "$fixtures_folder/semver_unsupported_update_stage", TRUE],
'legacy, supported update' => ['aaa_update_test', '8.x-2.0', '8.x-2.1', "$fixtures_folder/legacy_supported_update_stage", FALSE],
'legacy, update to unsupported branch' => ['aaa_update_test', '8.x-2.0', '8.x-3.0', "$fixtures_folder/legacy_unsupported_update_stage", TRUE],
];
}
/**
* Tests updating to a release during pre-apply.
*
* @param string $project
* The project to update.
* @param string $installed_version
* The installed version of the project.
* @param string $target_version
* The target version.
* @param string $stage_dir
* Path of fixture stage directory. It will be used as the virtual project's
* stage directory.
* @param bool $error_expected
* Whether an error is expected in the update.
*
* @dataProvider providerTestPreApplyException
*/
public function testPreApplyException(string $project, string $installed_version, string $target_version, string $stage_dir, bool $error_expected): void {
$this->enableModules(['aaa_automatic_updates_test', $project]);
$module_info = ['version' => $installed_version, 'project' => $project];
$aaa_automatic_updates_test_info = ['version' => '7.0.0', 'project' => 'aaa_automatic_updates_test'];
$this->config('update_test.settings')
->set("system_info.$project", $module_info)
->set("system_info.aaa_automatic_updates_test", $aaa_automatic_updates_test_info)
->save();
// Path of `active.installed.json` file. It will be used as the virtual
// project's active `vendor/composer/installed.json` file.
$this->setReleaseMetadata([
'aaa_automatic_updates_test' => __DIR__ . "/../../../../../package_manager/tests/fixtures/release-history/aaa_automatic_updates_test.9.8.2.xml",
$project => __DIR__ . "/../../../fixtures/release-history/$project.1.1.xml",
'drupal' => __DIR__ . '/../../../../../package_manager/tests/fixtures/release-history/drupal.9.8.2.xml',
]);
$active_dir = __DIR__ . '/../../../fixtures/update_release_validator/active';
$this->copyFixtureFolderToActiveDirectory($active_dir);
$this->copyFixtureFolderToStageDirectoryOnApply($stage_dir);
if ($error_expected) {
$expected_results = [
ValidationResult::createError(
["Project $project to version " . LegacyVersionUtility::convertToSemanticVersion($target_version)],
t('Cannot update because the following project version is not in the list of installable releases.')
),
];
}
else {
$expected_results = [];
}
// Always updating aaa_automatic_updates_test to 7.0.1(valid release) along
// with the project provided for test.
$this->assertUpdateResults(
[
'aaa_automatic_updates_test' => '7.0.1',
],
$expected_results,
PreApplyEvent::class
);
}
} }
...@@ -179,6 +179,10 @@ services: ...@@ -179,6 +179,10 @@ services:
class: Drupal\package_manager\Validator\ComposerPatchesValidator class: Drupal\package_manager\Validator\ComposerPatchesValidator
tags: tags:
- { name: event_subscriber } - { name: event_subscriber }
package_manager.validator.supported_releases:
class: Drupal\package_manager\Validator\SupportedReleaseValidator
tags:
- { name: event_subscriber }
package_manager.update_processor: package_manager.update_processor:
class: Drupal\package_manager\PackageManagerUpdateProcessor class: Drupal\package_manager\PackageManagerUpdateProcessor
arguments: [ '@config.factory', '@queue', '@update.fetcher', '@state', '@private_key', '@keyvalue', '@keyvalue.expirable' ] arguments: [ '@config.factory', '@queue', '@update.fetcher', '@state', '@private_key', '@keyvalue', '@keyvalue.expirable' ]
<?php
namespace Drupal\package_manager\Validator;
use Drupal\Component\Render\FormattableMarkup;
use Drupal\package_manager\ProjectInfo;
use Drupal\package_manager\LegacyVersionUtility;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\package_manager\Event\PreApplyEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Validates that updated projects are secure and supported.
*
* @internal
* This class is an internal part of the module's update handling and
* should not be used by external code.
*/
final class SupportedReleaseValidator implements EventSubscriberInterface {
use StringTranslationTrait;
/**
* Checks if the given version of a project is supported.
*
* Checks if the given version of the given project is in the core update
* system's list of known, secure, installable releases of that project.
* considered a supported release by verifying if the project is found in the
* core update system's list of known, secure, and installable releases.
*
* @param string $name
* The name of the project.
* @param string $semantic_version
* A semantic version number for the project.
*
* @return bool
* TRUE if the given version of the project is supported, otherwise FALSE.
* given version is not supported will return FALSE.
*/
protected function isSupportedRelease(string $name, string $semantic_version): bool {
$supported_releases = (new ProjectInfo($name))->getInstallableReleases();
if (!$supported_releases) {
return FALSE;
}
// If this version is found in the list of installable releases, it is
// secured and supported.
if (array_key_exists($semantic_version, $supported_releases)) {
return TRUE;
}
// If the semantic version number wasn't in the list of
// installable releases, convert it to a legacy version number and see
// if the version number is in the list.
$legacy_version = LegacyVersionUtility::convertToLegacyVersion($semantic_version);
if ($legacy_version && array_key_exists($legacy_version, $supported_releases)) {
return TRUE;
}
// Neither the semantic version nor the legacy version are in the list
// of installable releases, so the release isn't supported.
return FALSE;
}
/**
* Checks that the packages are secure and supported.
*
* @param \Drupal\package_manager\Event\PreApplyEvent $event
* The event object.
*/
public function checkStagedReleases(PreApplyEvent $event): void {
$active = $event->getStage()->getActiveComposer();
$staged = $event->getStage()->getStageComposer();
$updated_packages = array_merge(
$staged->getPackagesNotIn($active),
$staged->getPackagesWithDifferentVersionsIn($active)
);
$unknown_packages = [];
$unsupported_packages = [];
foreach ($updated_packages as $package_name => $staged_package) {
// Only packages of the types 'drupal-module' or 'drupal-theme' that
// start with 'drupal/' will have update XML from drupal.org.
if (!in_array($staged_package->getType(), ['drupal-module', 'drupal-theme'], TRUE)
|| !str_starts_with($package_name, 'drupal/')) {
continue;
}
$project_name = $staged->getProjectForPackage($package_name);
if (empty($project_name)) {
$unknown_packages[] = $package_name;
continue;
}
$semantic_version = $staged_package->getPrettyVersion();
if (!$this->isSupportedRelease($project_name, $semantic_version)) {
$unsupported_packages[] = new FormattableMarkup('@project_name (@package_name) @version', [
'@project_name' => $project_name,
'@package_name' => $package_name,
'@version' => $semantic_version,
]);
}
}
if ($unsupported_packages) {
$summary = $this->formatPlural(
count($unsupported_packages),
'Cannot update because the following project version is not in the list of installable releases.',
'Cannot update because the following project versions are not in the list of installable releases.'
);
$event->addError($unsupported_packages, $summary);
}
if ($unknown_packages) {
$summary = $this->formatPlural(
count($unknown_packages),
'Cannot update because the following new or updated Drupal package does not have project information.',
'Cannot update because the following new or updated Drupal packages do not have project information.',
);
$event->addError($unknown_packages, $summary);
}
}
/**
* {@inheritdoc}
*/
public static function getSubscribedEvents() {
return [
PreApplyEvent::class => 'checkStagedReleases',
];
}
}
<?xml version="1.0" encoding="utf-8"?>
<!-- Test legacy versions -->
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>AAA Update test</title>
<short_name>aaa_update_test</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>8.x-2.,8.x-1.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/aaa_update_test</link>
<terms>
<term><name>Projects</name><value>AAA Update test project</value></term>
</terms>
<releases>
<release>
<name>AAA Update test 8.x-3.0</name>
<version>8.x-3.0</version>
<tag>8.x-3.0</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-3-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8-3-0.tar.gz</download_link>
<date>1584195300</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>AAA Update test 8.x-2.1</name>
<version>8.x-2.1</version>
<tag>8.x-2.1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-2-1.tar.gz</download_link>
<date>1581603300</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>AAA Update test 8.x-2.1-beta1</name>
<version>8.x-2.1-beta1</version>
<tag>8.x-2.1-beta1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-1-beta1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-2-1-beta1.tar.gz</download_link>
<date>1579011300</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>AAA Update test 8.x-2.1-alpha1</name>
<version>8.x-2.1-alpha1</version>
<tag>8.x-2.1-alpha1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-1-alpha1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-2-1-alpha1.tar.gz</download_link>
<date>1576419300</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>AAA Update test 8.x-2.0</name>
<version>8.x-2.0</version>
<tag>8.x-2.0</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-2-0.tar.gz</download_link>
<date>1573827300</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>AAA Update test 8.x-2.0-beta1</name>
<version>8.x-2.0-beta1</version>
<tag>8.x-2.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-beta1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-2-0-beta1.tar.gz</download_link>
<date>1571235300</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>AAA Update test 8.x-2.0-alpha1</name>
<version>8.x-2.0-alpha1</version>
<tag>8.x-2.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-2-0-alpha1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-2-0-alpha1.tar.gz</download_link>
<date>1568643300</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>AAA Update test 8.x-1.1</name>
<version>8.x-1.1</version>
<tag>8.x-1.1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-1-1.tar.gz</download_link>
<date>1566051300</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>AAA Update test 8.x-1.1-beta1</name>
<version>8.x-1.1-beta1</version>
<tag>8.x-1.1-beta1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-1-beta1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-1-1-beta1.tar.gz</download_link>
<date>1563459300</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>AAA Update test 8.x-1.1-alpha1</name>
<version>8.x-1.1-alpha1</version>
<tag>8.x-1.1-alpha1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-1-alpha1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-1-1-alpha1.tar.gz</download_link>
<date>1560867300</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>AAA Update test 8.x-1.0</name>
<version>8.x-1.0</version>
<tag>8.x-1.0</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-0-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-1-0.tar.gz</download_link>
<date>1558275300</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>AAA Update test 8.x-1.0-beta1</name>
<version>8.x-1.0-beta1</version>
<tag>8.x-1.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-0-beta1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-1-0-beta1.tar.gz</download_link>
<date>1555683300</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>AAA Update test 8.x-1.0-alpha1</name>
<version>8.x-1.0-alpha1</version>
<tag>8.x-1.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/aaa_update_test-8-x-1-0-alpha1-release</release_link>
<download_link>http://example.com/aaa_update_test-8-x-1-0-alpha1.tar.gz</download_link>
<date>1553091300</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>
<?xml version="1.0" encoding="utf-8"?>
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Alpha</title>
<short_name>alpha</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>1.1.,1.0.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/alpha</link>
<terms>
<term><name>Projects</name><value>Alpha project</value></term>
</terms>
<releases>
<release>
<name>Alpha 1.1.0</name>
<version>1.1.0</version>
<tag>1.1.0</tag>
<status>published</status>
<release_link>http://example.com/alpha-1-1-0-release</release_link>
<download_link>http://example.com/alpha-1-1-0.tar.gz</download_link>
<date>1584195300</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>Alpha 1.0.0</name>
<version>1.0.0</version>
<tag>1.0.0</tag>
<status>published</status>
<release_link>http://example.com/alpha-1-0-0-release</release_link>
<download_link>http://example.com/alpha-1-0-0.tar.gz</download_link>
<date>1581603300</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>
<?xml version="1.0" encoding="utf-8"?>
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Semver Test</title>
<short_name>semver_test</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>8.0.,8.1.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/semver_test</link>
<terms>
<term><name>Projects</name><value>Semver Test project</value></term>
</terms>
<releases>
<release>
<name>Semver Test 8.2.0</name>
<version>8.2.0</version>
<tag>8.2.0</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-2-0-release</release_link>
<download_link>http://example.com/semver_test-8-2-0.tar.gz</download_link>
<date>1584195300</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>Semver Test 8.1.1</name>
<version>8.1.1</version>
<tag>8.1.1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-1-1-release</release_link>
<download_link>http://example.com/semver_test-8-1-1.tar.gz</download_link>
<date>1581603300</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>Semver Test 8.1.1-beta1</name>
<version>8.1.1-beta1</version>
<tag>8.1.1-beta1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-1-1-beta1-release</release_link>
<download_link>http://example.com/semver_test-8-1-1-beta1.tar.gz</download_link>
<date>1579011300</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>Semver Test 8.1.1-alpha1</name>
<version>8.1.1-alpha1</version>
<tag>8.1.1-alpha1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-1-1-alpha1-release</release_link>
<download_link>http://example.com/semver_test-8-1-1-alpha1.tar.gz</download_link>
<date>1576419300</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>Semver Test 8.1.0</name>
<version>8.1.0</version>
<tag>8.1.0</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-1-0-release</release_link>
<download_link>http://example.com/semver_test-8-1-0.tar.gz</download_link>
<date>1573827300</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>Semver Test 8.1.0-beta1</name>
<version>8.1.0-beta1</version>
<tag>8.1.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-1-0-beta1-release</release_link>
<download_link>http://example.com/semver_test-8-1-0-beta1.tar.gz</download_link>
<date>1571235300</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>Semver Test 8.1.0-alpha1</name>
<version>8.1.0-alpha1</version>
<tag>8.1.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-1-0-alpha1-release</release_link>
<download_link>http://example.com/semver_test-8-1-0-alpha1.tar.gz</download_link>
<date>1568643300</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>Semver Test 8.0.1</name>
<version>8.0.1</version>
<tag>8.0.1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-0-1-release</release_link>
<download_link>http://example.com/semver_test-8-0-1.tar.gz</download_link>
<date>1566051300</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>Semver Test 8.0.1-beta1</name>
<version>8.0.1-beta1</version>
<tag>8.0.1-beta1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-0-1-beta1-release</release_link>
<download_link>http://example.com/semver_test-8-0-1-beta1.tar.gz</download_link>
<date>1563459300</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>Semver Test 8.0.1-alpha1</name>
<version>8.0.1-alpha1</version>
<tag>8.0.1-alpha1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-0-1-alpha1-release</release_link>
<download_link>http://example.com/semver_test-8-0-1-alpha1.tar.gz</download_link>
<date>1560867300</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>Semver Test 8.0.0</name>
<version>8.0.0</version>
<tag>8.0.0</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-0-0-release</release_link>
<download_link>http://example.com/semver_test-8-0-0.tar.gz</download_link>
<date>1558275300</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>Semver Test 8.0.0-beta1</name>
<version>8.0.0-beta1</version>
<tag>8.0.0-beta1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-0-0-beta1-release</release_link>
<download_link>http://example.com/semver_test-8-0-0-beta1.tar.gz</download_link>
<date>1555683300</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>Semver Test 8.0.0-alpha1</name>
<version>8.0.0-alpha1</version>
<tag>8.0.0-alpha1</tag>
<status>published</status>
<release_link>http://example.com/semver_test-8-0-0-alpha1-release</release_link>
<download_link>http://example.com/semver_test-8-0-0-alpha1.tar.gz</download_link>
<date>1553091300</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>
<?xml version="1.0" encoding="utf-8"?>
<project xmlns:dc="http://purl.org/dc/elements/1.1/">
<title>Updated Module</title>
<short_name>updated_module</short_name>
<dc:creator>Drupal</dc:creator>
<supported_branches>1.1.,1.0.</supported_branches>
<project_status>published</project_status>
<link>http://example.com/project/alpha</link>
<terms>
<term><name>Projects</name><value>Updated Module project</value></term>
</terms>
<releases>
<release>
<name>Updated Module 1.1.0</name>
<version>1.1.0</version>
<tag>1.1.0</tag>
<status>published</status>
<release_link>http://example.com/updated_module-1-1-0-release</release_link>
<download_link>http://example.com/updated_module-1-1-0.tar.gz</download_link>
<date>1584195300</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>Updated Module 1.0.0</name>
<version>1.0.0</version>
<tag>1.0.0</tag>
<status>published</status>
<release_link>http://example.com/updated_module-1-0-0-release</release_link>
<download_link>http://example.com/updated_module-1-0-0.tar.gz</download_link>
<date>1581603300</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>
{
"packages": [
{
"name": "drupal/core-recommended",
"version": "9.8.0",
"require": {
"drupal/core": "9.8.0"
}
},
{
"name": "drupal/core",
"version": "9.8.0"
},
{
"name": "drupal/dependency",
"version": "9.8.1",
"type": "drupal-library"
},
{
"name": "drupal/aaa_automatic_updates_test",
"version": "7.0.1",
"type": "drupal-module"
}
]
}
<?php
/**
* @file
* Lists packages installed by Composer.
*/
$projects_dir = __DIR__ . '/../../modules';
return [
'versions' => [
'drupal/aaa_automatic_updates_test' => [
'type' => 'drupal-module',
'install_path' => $projects_dir . '/aaa_automatic_updates_test',
],
],
];
{
"packages": [
{
"name": "drupal/core-recommended",
"version": "9.8.0",
"require": {
"drupal/core": "9.8.0"
}
},
{
"name": "drupal/core",
"version": "9.8.0"
},
{
"name": "drupal/dependency",
"version": "9.8.1",
"type": "drupal-library"
},
{
"name": "drupal/aaa_automatic_updates_test",
"version": "7.0.1-dev",
"type": "drupal-module"
}
]
}
<?php
/**
* @file
* Lists packages installed by Composer.
*/
$projects_dir = __DIR__ . '/../../modules';
return [
'versions' => [
'drupal/aaa_automatic_updates_test' => [
'type' => 'drupal-module',
'install_path' => $projects_dir . '/aaa_automatic_updates_test',
],
],
];
...@@ -16,11 +16,6 @@ ...@@ -16,11 +16,6 @@
"version": "9.8.0", "version": "9.8.0",
"type": "drupal-library" "type": "drupal-library"
}, },
{
"name": "drupal/aaa_automatic_updates_test",
"version": "7.0.0",
"type": "drupal-module"
},
{ {
"name": "drupal/aaa_update_test", "name": "drupal/aaa_update_test",
"version": "2.0.0", "version": "2.0.0",
......
<?php
/**
* @file
* Lists packages installed by Composer.
*/
$projects_dir = __DIR__ . '/../../modules';
return [
'versions' => [
'drupal/semver_test' => [
'type' => 'drupal-module',
'install_path' => $projects_dir . '/semver_test',
],
'drupal/aaa_update_test' => [
'type' => 'drupal-module',
'install_path' => $projects_dir . '/aaa_update_test',
],
],
];
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