Verified Commit 6a4608b1 authored by godotislate's avatar godotislate
Browse files

task: #3614401 Allow install profiles to opt out of being installed

By: catch
By: nicxvan
By: godotislate
parent 761e0330
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1705,7 +1705,9 @@ function install_install_profile(&$install_state): void {
  // any disparities that this creates.
  \Drupal::service('config.installer')->installOptionalConfig();

  if (empty($install_state['profile_info']['opt_out_install'])) {
    \Drupal::service('module_installer')->install([$install_state['parameters']['profile']], FALSE);
  }

  // Ensure that the install profile's theme is used.
  // @see _drupal_maintenance_theme()
+2 −1
Original line number Diff line number Diff line
@@ -216,7 +216,8 @@ function drupal_install_system($install_state): void {
  // Store the installation profile in configuration to populate the
  // 'install_profile' container parameter.
  $config = \Drupal::configFactory()->getEditable('core.extension');
  if ($install_state['parameters']['profile'] === FALSE) {
  if ($install_state['parameters']['profile'] === FALSE
    || !empty($install_state['profile_info']['opt_out_install'])) {
    $config->clear('profile');
  }
  else {
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ class CKEditor5FragmentLinkTest extends WebDriverTestBase {
  /**
   * {@inheritdoc}
   */
  protected static $modules = ['node', 'ckeditor5'];
  protected static $modules = ['node', 'ckeditor5', 'body_field'];

  /**
   * The admin user.
+6 −0
Original line number Diff line number Diff line
@@ -34,6 +34,7 @@ class ConfigTranslationOverviewTest extends BrowserTestBase {
    'node',
    'views',
    'views_ui',
    'body_field',
  ];

  /**
@@ -41,6 +42,11 @@ class ConfigTranslationOverviewTest extends BrowserTestBase {
   */
  protected $defaultTheme = 'stark';

  /**
   * {@inheritdoc}
   */
  protected $profile = 'testing_locale';

  /**
   * Languages to enable.
   *
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ class FormErrorHandlerCKEditor5Test extends WebDriverTestBase {
   * {@inheritdoc}
   */
  protected static $modules = [
    'body_field',
    'node',
    'ckeditor5',
    'inline_form_errors',
Loading