HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.2.34
System: Linux atalantini.com 3.10.0-1127.13.1.el7.x86_64 #1 SMP Tue Jun 23 15:46:38 UTC 2020 x86_64
User: root (0)
PHP: 7.2.34
Disabled: NONE
Upload Files
File: /var/www/html/drupal/20210422/public_html/modules/features/features.install
<?php

/**
 * @file
 * Contains install and update functions for Features.
 */

/**
 * Rebuild the container to add a parameter to the features.manager service.
 */
function features_update_8300() {
  // Empty update to cause a cache rebuild so that the container is rebuilt.
}

/**
 * Update existing feature bundles with new alter plugin configuration.
 */
function features_update_8301() {
  foreach (\Drupal::service('entity_type.manager')->getStorage('features_bundle')->loadMultiple() as $bundle) {
    $bundle = \Drupal::configFactory()->getEditable('features.bundle.' . $bundle->id());
    $assignments = $bundle->get('assignments');
    $assignments['alter'] = [
      'core' => TRUE,
      'uuid' => TRUE,
      'user_permissions' => TRUE,
      'enabled' => TRUE,
      'weight' => 0,
    ];
    $bundle->set('assignments', $assignments)->save();
  }
}