Skip to content
Snippets Groups Projects
Commit fc7a3966 authored by Adam G-H's avatar Adam G-H
Browse files

Issue #3365414 by phenaproxima, Wim Leers, tedbow: Don't declare compatibility...

Issue #3365414 by phenaproxima, Wim Leers, tedbow: Don't declare compatibility with Drupal 9.7, which is not a thing
parent 747c518f
No related branches found
No related tags found
No related merge requests found
name: 'Automatic Updates' name: 'Automatic Updates'
type: module type: module
description: 'Automatically updates Drupal core.' description: 'Automatically updates Drupal core.'
core_version_requirement: ^9.7 || ^10 core_version_requirement: ^10
dependencies: dependencies:
- drupal:package_manager - drupal:package_manager
- drupal:update - drupal:update
name: 'Automatic Updates Extensions' name: 'Automatic Updates Extensions'
type: module type: module
description: 'Allows updates to themes and modules' description: 'Allows updates to themes and modules'
core_version_requirement: ^9.7 || ^10 core_version_requirement: ^10
lifecycle: experimental lifecycle: experimental
dependencies: dependencies:
- drupal:automatic_updates - drupal:automatic_updates
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"drupal/core": "^9.7 || ^10",
"php-tuf/composer-stager": "2.0-alpha1", "php-tuf/composer-stager": "2.0-alpha1",
"composer-runtime-api": "^2.1" "composer-runtime-api": "^2.1"
}, },
......
name: 'Package Manager' name: 'Package Manager'
type: module type: module
description: 'API module providing functionality to stage package installs and updates with Composer.' description: 'API module providing functionality to stage package installs and updates with Composer.'
core_version_requirement: ^9.7 || ^10 core_version_requirement: ^10
dependencies: dependencies:
- drupal:update - drupal:update
...@@ -5,6 +5,7 @@ declare(strict_types = 1); ...@@ -5,6 +5,7 @@ declare(strict_types = 1);
namespace Drupal\Tests\package_manager\Build; namespace Drupal\Tests\package_manager\Build;
use Drupal\BuildTests\QuickStart\QuickStartTestBase; use Drupal\BuildTests\QuickStart\QuickStartTestBase;
use Drupal\Component\Serialization\Yaml;
use Drupal\Composer\Composer; use Drupal\Composer\Composer;
use Drupal\package_manager\Event\PostApplyEvent; use Drupal\package_manager\Event\PostApplyEvent;
use Drupal\package_manager\Event\PostCreateEvent; use Drupal\package_manager\Event\PostCreateEvent;
...@@ -312,6 +313,12 @@ END; ...@@ -312,6 +313,12 @@ END;
// Now that we know the project was created successfully, we can set the // Now that we know the project was created successfully, we can set the
// web root with confidence. // web root with confidence.
$this->webRoot = 'project/' . $this->runComposer('composer config extra.drupal-scaffold.locations.web-root', 'project'); $this->webRoot = 'project/' . $this->runComposer('composer config extra.drupal-scaffold.locations.web-root', 'project');
// List the info files that need to be made compatible with our fake version
// of Drupal core.
$info_files = [
'core/modules/package_manager/package_manager.info.yml',
'core/modules/automatic_updates/automatic_updates.info.yml',
];
// BEGIN: DELETE FROM CORE MERGE REQUEST // BEGIN: DELETE FROM CORE MERGE REQUEST
// Install Automatic Updates into the test project and ensure it wasn't // Install Automatic Updates into the test project and ensure it wasn't
// symlinked. // symlinked.
...@@ -319,11 +326,24 @@ END; ...@@ -319,11 +326,24 @@ END;
if (str_contains($automatic_updates_dir, 'automatic_updates')) { if (str_contains($automatic_updates_dir, 'automatic_updates')) {
$dir = 'project'; $dir = 'project';
$this->runComposer("composer config repo.automatic_updates path $automatic_updates_dir", $dir); $this->runComposer("composer config repo.automatic_updates path $automatic_updates_dir", $dir);
$output = $this->runComposer('COMPOSER_MIRROR_PATH_REPOS=1 composer require psr/http-message', $dir); $output = $this->runComposer('COMPOSER_MIRROR_PATH_REPOS=1 composer require --update-with-all-dependencies psr/http-message "drupal/automatic_updates:@dev"', $dir);
$output = $this->runComposer('COMPOSER_MIRROR_PATH_REPOS=1 composer require --update-with-all-dependencies "drupal/automatic_updates:@dev"', $dir);
$this->assertStringNotContainsString('Symlinking', $output); $this->assertStringNotContainsString('Symlinking', $output);
} }
// In contrib, the info files have different paths.
$info_files = [
'modules/contrib/automatic_updates/package_manager/package_manager.info.yml',
'modules/contrib/automatic_updates/automatic_updates.info.yml',
'modules/contrib/automatic_updates/automatic_updates_extensions/automatic_updates_extensions.info.yml',
];
// END: DELETE FROM CORE MERGE REQUEST // END: DELETE FROM CORE MERGE REQUEST
foreach ($info_files as $path) {
$path = $this->getWebRoot() . $path;
$this->assertFileIsWritable($path);
$info = file_get_contents($path);
$info = Yaml::decode($info);
$info['core_version_requirement'] .= ' || ^9.7';
file_put_contents($path, Yaml::encode($info));
}
// Install Drupal. // Install Drupal.
$this->installQuickStart('minimal'); $this->installQuickStart('minimal');
......
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