Skip to content

Commit

Permalink
Merge pull request #26 from omarlopesino/feature/recipes-support
Browse files Browse the repository at this point in the history
Allow aljibe-installed sites to be able to install recipes
  • Loading branch information
juanjol authored Dec 11, 2024
2 parents 24431c8 + f255948 commit dcd0e67
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 5 deletions.
13 changes: 13 additions & 0 deletions kickstart/common/patches/drupal-core-3315694-1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/core/lib/Drupal/Core/Recipe/RecipeCommand.php b/core/lib/Drupal/Core/Recipe/RecipeCommand.php
index 3040e40960..6d6f496ada 100644
--- a/core/lib/Drupal/Core/Recipe/RecipeCommand.php
+++ b/core/lib/Drupal/Core/Recipe/RecipeCommand.php
@@ -192,7 +192,7 @@ private function rollBackToCheckpoint(Checkpoint $checkpoint): void {
* Exception thrown if kernel does not boot.
*/
protected function boot() {
- $kernel = new DrupalKernel('prod', $this->classLoader);
+ $kernel = new DrupalKernel('prod', $this->classLoader, FALSE);
$kernel::bootEnvironment();
$kernel->setSitePath($this->getSitePath());
Settings::initialize($kernel->getAppRoot(), $kernel->getSitePath(), $this->classLoader);
13 changes: 13 additions & 0 deletions kickstart/common/patches/drupal-core-3416735-1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php
index 1c08700dc69109ee3d9d6a3cfdbd2227b07cef34..93b7419d93fe718b711fabf2b12d785cb57b3e7c 100644
--- a/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php
+++ b/core/lib/Drupal/Core/StreamWrapper/StreamWrapperManager.php
@@ -162,6 +162,8 @@ public function addStreamWrapper($service_id, $class, $scheme) {
'type' => $class::getType(),
'service_id' => $service_id,
];
+
+ $this->registerWrapper($scheme, $class, $class::getType());
}

/**
24 changes: 21 additions & 3 deletions kickstart/d10/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/woredeyonas/Drupal-Recipe-Unpack.git"
},
{
"type": "composer",
"url": "https://packages.drupal.org/8"
Expand Down Expand Up @@ -41,7 +45,8 @@
"metadrop/drupal-artifact-builder": "^2.0.2"
},
"require-dev": {
"metadrop/drupal-dev": "^2.6.0"
"metadrop/drupal-dev": "^2.6.0",
"ewcomposer/unpack": "dev-master"
},
"conflict": {
"drupal/drupal": "*"
Expand All @@ -63,18 +68,28 @@
"php-http/discovery": true,
"phpro/grumphp": true,
"phpstan/extension-installer": true,
"tbachert/spi": true
"tbachert/spi": true,
"ewcomposer/unpack": true
}
},
"scripts": {
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold"
},
"extra": {
"patches": {
"drupal/core": {
"Stream wrappers not registered when installing module's default config - https://www.drupal.org/project/drupal/issues/3416735": "https://git.drupalcode.org/project/drupal/-/merge_requests/10421.diff",
"Allow recipe command to write to the container ensuring that cache does not be cleared after a recipe installs a module - https://www.drupal.org/project/drupal/issues/3315694": "patches/drupal-core-3315694-1.patch"
}
},
"drupal-scaffold": {
"locations": {
"web-root": "./web"
}
},
"installer-types": [
"drupal-recipe"
],
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
Expand All @@ -84,7 +99,10 @@
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/profiles/custom/{$name}": ["type:drupal-custom-profile"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
"web/themes/custom/{$name}": ["type:drupal-custom-theme"],
"web/recipes/{$name}": [
"type:drupal-recipe"
]
},
"dev-files": {
"bin": [
Expand Down
22 changes: 20 additions & 2 deletions kickstart/d11/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
}
],
"repositories": [
{
"type": "vcs",
"url": "https://github.com/woredeyonas/Drupal-Recipe-Unpack.git"
},
{
"type": "composer",
"url": "https://packages.drupal.org/8"
Expand All @@ -28,7 +32,8 @@
"metadrop/drupal-artifact-builder": "^1.4"
},
"require-dev": {
"metadrop/drupal-dev": "^2.0.0"
"metadrop/drupal-dev": "^2.6.0",
"ewcomposer/unpack": "dev-master"
},
"conflict": {
"drupal/drupal": "*"
Expand All @@ -50,18 +55,28 @@
"metadrop/composer-comments": true,
"php-http/discovery": true,
"tbachert/spi": true,
"ewcomposer/unpack": true,
"mxr576/ddqg-composer-audit": true
}
},
"scripts": {
"drupal-scaffold": "DrupalComposer\\DrupalScaffold\\Plugin::scaffold"
},
"extra": {
"patches": {
"drupal/core": {
"Stream wrappers not registered when installing module's default config - https://www.drupal.org/project/drupal/issues/3416735": "https://git.drupalcode.org/project/drupal/-/merge_requests/10421.diff",
"Allow recipe command to write to the container ensuring that cache does not be cleared after a recipe installs a module - https://www.drupal.org/project/drupal/issues/3315694": "patches/drupal-core-3315694-1.patch"
}
},
"drupal-scaffold": {
"locations": {
"web-root": "./web"
}
},
"installer-types": [
"drupal-recipe"
],
"installer-paths": {
"web/core": ["type:drupal-core"],
"web/libraries/{$name}": ["type:drupal-library"],
Expand All @@ -71,7 +86,10 @@
"drush/Commands/contrib/{$name}": ["type:drupal-drush"],
"web/modules/custom/{$name}": ["type:drupal-custom-module"],
"web/profiles/custom/{$name}": ["type:drupal-custom-profile"],
"web/themes/custom/{$name}": ["type:drupal-custom-theme"]
"web/themes/custom/{$name}": ["type:drupal-custom-theme"],
"web/recipes/{$name}": [
"type:drupal-recipe"
]
},
"dev-files": {
"bin": [
Expand Down

0 comments on commit dcd0e67

Please sign in to comment.