Skip to content

Commit

Permalink
Closes #2916 Exclude BigPipe module from Quickstart installs on Panth…
Browse files Browse the repository at this point in the history
…eon (#2917)

Co-authored-by: Joe Parsons <[email protected]>
  • Loading branch information
bberndt-uaz and joeparsons authored Nov 13, 2023
1 parent 08617a6 commit 172e869
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
1 change: 0 additions & 1 deletion az_quickstart.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ install:
- easy_breadcrumb:easy_breadcrumb
- drupal:page_cache
- drupal:dynamic_page_cache
- drupal:big_pipe
- drupal:taxonomy
- drupal:dblog
- drupal:search
Expand Down
27 changes: 17 additions & 10 deletions az_quickstart.install
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,32 @@ function az_quickstart_install() {
]);
$shortcut->save();

// Install Pantheon module dependencies when running on Pantheon.
// Install additional modules if site is running on Pantheon (or not).
if (defined('PANTHEON_ENVIRONMENT')) {
$pantheon_modules = [
// Modules to install only on Pantheon.
$extra_modules = [
'pantheon_advanced_page_cache',
'environment_indicator',
];
foreach ($pantheon_modules as $module) {
try {
\Drupal::service('module_installer')->install([$module]);
}
catch (MissingDependencyException $e) {
\Drupal::logger('az_quickstart')->warning('@module module not available to install.', ['@module' => $module]);
}
}
else {
// Modules to install if not on Pantheon.
$extra_modules = [
'big_pipe',
];
}
foreach ($extra_modules as $module) {
try {
\Drupal::service('module_installer')->install([$module]);
}
catch (MissingDependencyException $e) {
\Drupal::logger('az_quickstart')->warning('@module module not available to install.', ['@module' => $module]);
}
}
}

/**
* Implements hook_requireents().
* Implements hook_requirements().
*/
function az_quickstart_requirements($phase) {
$requirements = [];
Expand Down

0 comments on commit 172e869

Please sign in to comment.