Commit ba5cf8e2 authored by alexpott's avatar alexpott

Issue #2969965 by Lendude, Mile23, heddn, Jo Fitzgerald, jmikii, Berdir,...

Issue #2969965 by Lendude, Mile23, heddn, Jo Fitzgerald, jmikii, Berdir, alexpott: Fix Drupal\system\Tests\Update\DbUpdatesTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0
parent 408c540c
......@@ -7,3 +7,4 @@ core: 8.x
dependencies:
- drupal:field
- drupal:text
- drupal:system
......@@ -5,7 +5,6 @@
* Install, update and uninstall functions for the entity_test module.
*/
use Drupal\system\Tests\Update\DbUpdatesTrait;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\field\Entity\FieldConfig;
......@@ -55,5 +54,7 @@ function entity_test_schema() {
return $schema;
}
DbUpdatesTrait::includeUpdates('entity_test', 'entity_definition_updates');
DbUpdatesTrait::includeUpdates('entity_test', 'status_report');
$index = \Drupal::state()->get('entity_test.db_updates.entity_definition_updates');
module_load_include('inc', 'entity_test', 'update/entity_definition_updates_' . $index);
$index = \Drupal::state()->get('entity_test.db_updates.status_report');
module_load_include('inc', 'entity_test', 'update/status_report_' . $index);
......@@ -5,6 +5,5 @@
* Install, update and uninstall functions for the Entity Test Update module.
*/
use Drupal\system\Tests\Update\DbUpdatesTrait;
DbUpdatesTrait::includeUpdates('entity_test_update', 'entity_rev_pub_updates');
$index = \Drupal::state()->get('entity_test_update.db_updates.entity_rev_pub_updates');
module_load_include('inc', 'entity_test_update', 'update/entity_rev_pub_updates_' . $index);
......@@ -42,18 +42,4 @@ protected function applyUpdates() {
$this->checkForMetaRefresh();
}
/**
* Conditionally load Update API functions for the specified group.
*
* @param string $module
* The name of the module defining the update functions.
* @param string $group
* A name identifying the group of update functions to enable.
*/
public static function includeUpdates($module, $group) {
if ($index = \Drupal::state()->get($module . '.db_updates.' . $group)) {
module_load_include('inc', $module, 'update/' . $group . '_' . $index);
}
}
}
......@@ -123,7 +123,6 @@ public static function getSkippedDeprecations() {
'MigrateCckFieldPluginManager is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateFieldPluginManager instead.',
'MigrateCckFieldPluginManagerInterface is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateFieldPluginManagerInterface instead.',
'The "plugin.manager.migrate.cckfield" service is deprecated. You should use the \'plugin.manager.migrate.field\' service instead. See https://www.drupal.org/node/2751897',
'Drupal\system\Tests\Update\DbUpdatesTrait is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Use \Drupal\FunctionalTests\Update\DbUpdatesTrait instead. See https://www.drupal.org/node/2896640.',
'Providing settings under \'handler_settings\' is deprecated and will be removed before 9.0.0. Move the settings in the root of the configuration array. See https://www.drupal.org/node/2870971.',
'The Drupal\editor\Plugin\EditorBase::settingsFormValidate method is deprecated since version 8.3.x and will be removed in 9.0.0.',
'The Drupal\migrate\Plugin\migrate\process\Migration is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use Drupal\migrate\Plugin\migrate\process\MigrationLookup',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment