Unverified Commit 22d759b1 authored by alexpott's avatar alexpott

Issue #3054749 by Berdir: Fix handler_settings deprecation message

parent b1657868
......@@ -283,12 +283,11 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
$options = [
'target_type' => $field_definition->getFieldStorageDefinition()->getSetting('target_type'),
'handler' => $field_definition->getSetting('handler'),
'handler_settings' => $field_definition->getSetting('handler_settings') ?: [],
'entity' => NULL,
];
] + $field_definition->getSetting('handler_settings') ?: [];
$entity_type = \Drupal::entityTypeManager()->getDefinition($options['target_type']);
$options['handler_settings']['sort'] = [
$options['sort'] = [
'field' => $entity_type->getKey('id'),
'direction' => 'DESC',
];
......@@ -305,7 +304,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
// Attempt to create a sample entity, avoiding recursion.
$entity_storage = \Drupal::entityTypeManager()->getStorage($options['target_type']);
if ($entity_storage instanceof ContentEntityStorageInterface) {
$bundle = static::getRandomBundle($entity_type, $options['handler_settings']);
$bundle = static::getRandomBundle($entity_type, $options);
// Track the generated entity by reference type, target type, and bundle.
$key = $field_definition->getTargetEntityTypeId() . ':' . $options['target_type'] . ':' . $bundle;
......
......@@ -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',
'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',
'Drupal\system\Plugin\views\field\BulkForm is deprecated in Drupal 8.5.x, will be removed before Drupal 9.0.0. Use \Drupal\views\Plugin\views\field\BulkForm instead. See https://www.drupal.org/node/2916716.',
......
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