setDeprecationsEnabled example

\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'view', function DViewEntityInterface $view) use ($view_config_updater): bool {
    return $view_config_updater->needsTimestampFormatterTimeDiffUpdate($view);
  });
}

/** * Fix '-revision_id' replacement token syntax. */
function views_post_update_fix_revision_id_part(&$sandbox = NULL): void {
  /** @var \Drupal\views\ViewsConfigUpdater $view_config_updater */
  $view_config_updater = \Drupal::classResolver(ViewsConfigUpdater::class);
  $view_config_updater->setDeprecationsEnabled(FALSE);
  \Drupal::classResolver(ConfigEntityUpdater::class)
    ->update($sandbox, 'view', function DViewEntityInterface $view) use ($view_config_updater) {
      return $view_config_updater->needsRevisionFieldHyphenFix($view);
    });
}
return [
    'responsive_image_post_update_recreate_dependencies' => '9.0.0',
  ];
}

/** * Re-order mappings by breakpoint ID and descending numeric multiplier order. */
function responsive_image_post_update_order_multiplier_numerically(array &$sandbox = NULL): void {
  /** @var \Drupal\responsive_image\ResponsiveImageConfigUpdater $responsive_image_config_updater */
  $responsive_image_config_updater = \Drupal::classResolver(ResponsiveImageConfigUpdater::class);
  $responsive_image_config_updater->setDeprecationsEnabled(FALSE);
  \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'responsive_image_style', function DResponsiveImageStyleInterface $responsive_image_style) use ($responsive_image_config_updater): bool {
    return $responsive_image_config_updater->orderMultipliersNumerically($responsive_image_style);
  });
}

/** * Add the image loading settings to responsive image field formatter instances. */
function responsive_image_post_update_image_loading_attribute(array &$sandbox = NULL): void {
  $responsive_image_config_updater = \Drupal::classResolver(ResponsiveImageConfigUpdater::class);
  $responsive_image_config_updater->setDeprecationsEnabled(FALSE);
  
'media_post_update_add_status_extra_filter' => '9.0.0',
    'media_post_update_modify_base_field_author_override' => '10.0.0',
  ];
}

/** * Add the oEmbed loading attribute setting to field formatter instances. */
function media_post_update_oembed_loading_attribute(array &$sandbox = NULL): void {
  $media_config_updater = \Drupal::classResolver(MediaConfigUpdater::class);
  assert($media_config_updater instanceof MediaConfigUpdater);
  $media_config_updater->setDeprecationsEnabled(TRUE);
  \Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'entity_view_display', function DEntityViewDisplayInterface $view_display) use ($media_config_updater): bool {
    return $media_config_updater->processOembedEagerLoadField($view_display);
  });
}
Home | Imprint | This part of the site doesn't use cookies.