Skip to content

Commit 3135f43

Browse files
committed
Fixed installer to correctly update composer.json for Drupal CMS starter.
1 parent ce663ed commit 3135f43

2 files changed

Lines changed: 21 additions & 3 deletions

File tree

.vortex/installer/src/Prompts/Handlers/Starter.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,20 @@ public function process(): void {
9393
if ($this->response == self::INSTALL_PROFILE_DRUPALCMS) {
9494
$cj = JsonManipulator::fromFile($this->tmpDir . '/composer.json');
9595

96-
$cj->addLink('require', 'drupal/cms', '^1.0', TRUE);
96+
$cj->addLink('require', 'drupal/cms', '^1.2', TRUE);
9797
$cj->addLink('require', 'wikimedia/composer-merge-plugin', '^2.1', TRUE);
9898
$cj->addLink('require', 'symfony/http-client', '^6.4 || ^7.0', TRUE);
9999

100+
$cj->addConfigSetting('allow-plugins.composer/installers', TRUE);
101+
$cj->addConfigSetting('allow-plugins.drupal/core-composer-scaffold', TRUE);
100102
$cj->addConfigSetting('allow-plugins.drupal/core-project-message', TRUE);
103+
$cj->addConfigSetting('allow-plugins.drupal/core-recipe-unpack', TRUE);
104+
$cj->addConfigSetting('allow-plugins.drupal/core-vendor-hardening', TRUE);
105+
$cj->addConfigSetting('allow-plugins.php-http/discovery', TRUE);
101106
$cj->addConfigSetting('allow-plugins.wikimedia/composer-merge-plugin', TRUE);
102107

108+
$cj->addProperty('minimum-stability', 'alpha');
109+
103110
$cj->addProperty('extra.merge-plugin.ignore-duplicates', FALSE);
104111
$cj->addProperty('extra.merge-plugin.merge-false', TRUE);
105112
$cj->addProperty('extra.merge-plugin.merge-extra', FALSE);

.vortex/installer/tests/Fixtures/install/starter_drupal_cms_profile/composer.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,29 @@
1717
},
1818
"require-dev": {
1919
"behat/behat": "__VERSION__",
20-
@@ -81,7 +84,9 @@
20+
@@ -58,7 +61,7 @@
21+
"url": "https://packages.drupal.org/8"
22+
}
23+
],
24+
- "minimum-stability": "beta",
25+
+ "minimum-stability": "alpha",
26+
"prefer-stable": true,
27+
"autoload": {
28+
"classmap": [
29+
@@ -81,7 +84,11 @@
2130
"php-http/discovery": true,
2231
"phpstan/extension-installer": true,
2332
"pyrech/composer-changelogs": true,
2433
- "tbachert/spi": true
2534
+ "tbachert/spi": true,
2635
+ "drupal/core-project-message": true,
36+
+ "drupal/core-recipe-unpack": true,
37+
+ "drupal/core-vendor-hardening": true,
2738
+ "wikimedia/composer-merge-plugin": true
2839
},
2940
"discard-changes": true,
3041
"platform": {
31-
@@ -158,7 +163,20 @@
42+
@@ -158,7 +165,20 @@
3243
"patchLevel": {
3344
"drupal/core": "-p2"
3445
},

0 commit comments

Comments
 (0)