diff -u b/core/modules/field/src/Plugin/migrate/process/FieldType.php b/core/modules/field/src/Plugin/migrate/process/FieldType.php --- b/core/modules/field/src/Plugin/migrate/process/FieldType.php +++ b/core/modules/field/src/Plugin/migrate/process/FieldType.php @@ -82,15 +82,14 @@ */ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { $field_type = is_array($value) ? $value[0] : $value; - try { - $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, [], $this->migration); - return $this->cckPluginManager->createInstance($plugin_id, [], $this->migration)->getFieldType($row); + $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, [], $this->migration); + return $this->fieldPluginManager->createInstance($plugin_id, [], $this->migration)->getFieldType($row); } catch (PluginNotFoundException $e) { try { - $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, [], $this->migration); - return $this->fieldPluginManager->createInstance($plugin_id, [], $this->migration)->getFieldType($row); + $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, [], $this->migration); + return $this->cckPluginManager->createInstance($plugin_id, [], $this->migration)->getFieldType($row); } catch (PluginNotFoundException $e) { return parent::transform($value, $migrate_executable, $row, $destination_property); diff -u b/core/modules/migrate_drupal/migrate_drupal.services.yml b/core/modules/migrate_drupal/migrate_drupal.services.yml --- b/core/modules/migrate_drupal/migrate_drupal.services.yml +++ b/core/modules/migrate_drupal/migrate_drupal.services.yml @@ -7,7 +7,6 @@ - '@cache.discovery' - '@module_handler' - '\Drupal\migrate_drupal\Annotation\MigrateField' - # @deprecated in 8.2.x, to be removed before 9.0.x. plugin.manager.migrate.cckfield: class: Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManager arguments: @@ -18,0 +18,5 @@ + deprecated: The "%service_id%" service is deprecated. You should use the +'plugin.manager.migrate.field' service instead. See https://www.drupal.org +/node/2751897 + + diff -u b/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php b/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php --- b/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php +++ b/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php @@ -2,6 +2,10 @@ namespace Drupal\migrate_drupal\Annotation; +@trigger_error('MigrateCckField is deprecated in Drupal 8.3.x and will be +removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField +instead.', E_USER_DEPRECATED); + /** * Deprecated: Defines a cckfield plugin annotation object. * diff -u b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php --- b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php +++ b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php @@ -2,12 +2,16 @@ namespace Drupal\migrate_drupal\Plugin; +@trigger_error('MigrateCckFieldInterface is deprecated in Drupal 8.3.x and will +be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField +instead.', E_USER_DEPRECATED); + use Drupal\migrate\Plugin\MigrationInterface; /** * Provides an interface for all CCK field type plugins. * - * @deprecated in Drupal 8.2.x, to be removed before Drupal 9.0.x. Use + * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use * \Drupal\migrate_drupal\Annotation\MigrateField instead. */ interface MigrateCckFieldInterface extends MigrateFieldInterface { diff -u b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php --- b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php +++ b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManager.php @@ -2,10 +2,14 @@ namespace Drupal\migrate_drupal\Plugin; +@trigger_error('MigrateCckFieldPluginManager is deprecated in Drupal 8.3.x and will +be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateFieldPluginManager +instead.', E_USER_DEPRECATED); + /** * Deprecated: Plugin manager for migrate field plugins. * - * @deprecated in Drupal 8.2.x, to be removed before Drupal 9.0.x. Use + * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use * \Drupal\migrate_drupal\Plugin\MigrateFieldPluginManager instead. * * @ingroup migration diff -u b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManagerInterface.php b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManagerInterface.php --- b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManagerInterface.php +++ b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldPluginManagerInterface.php @@ -2,10 +2,14 @@ namespace Drupal\migrate_drupal\Plugin; +@trigger_error('MigrateCckFieldPluginManagerInterface is deprecated in Drupal 8.3.x +and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateFieldPluginManagerInterface +instead.', E_USER_DEPRECATED); + /** * Provides an interface for cck field plugin manager. * - * @deprecated in Drupal 8.2.x, to be removed before Drupal 9.0.x. Use + * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use * \Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface instead. */ interface MigrateCckFieldPluginManagerInterface extends MigrateFieldPluginManagerInterface { } diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/cckfield/CckFieldPluginBase.php @@ -2,13 +2,17 @@ namespace Drupal\migrate_drupal\Plugin\migrate\cckfield; +@trigger_error('CckFieldPluginBase is deprecated in Drupal 8.3.x and will be +be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase +instead.', E_USER_DEPRECATED); + use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase; /** * The base class for all field plugins. * - * @deprecated in Drupal 8.2.x, to be removed before Drupal 9.0.x. Use + * @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use * \Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase instead. * * @ingroup migration diff -u b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php --- b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php +++ b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php @@ -160,21 +160,21 @@ foreach ($fields[$node_type] as $field_name => $info) { $field_type = $info['type']; try { - $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, ['core' => 6], $migration); - if (!isset($this->cckPluginCache[$field_type])) { - $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($plugin_id, ['core' => 6], $migration); + $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, ['core' => 6], $migration); + if (!isset($this->fieldPluginCache[$field_type])) { + $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 6], $migration); } - $this->cckPluginCache[$field_type] - ->processCckFieldValues($migration, $field_name, $info); + $this->fieldPluginCache[$field_type] + ->processFieldValues($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { try { - $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, ['core' => 6], $migration); - if (!isset($this->fieldPluginCache[$field_type])) { - $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 6], $migration); + $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, ['core' => 6], $migration); + if (!isset($this->cckPluginCache[$field_type])) { + $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($plugin_id, ['core' => 6], $migration); } - $this->fieldPluginCache[$field_type] - ->processFieldValues($migration, $field_name, $info); + $this->cckPluginCache[$field_type] + ->processCckFieldValues($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { $migration->setProcessOfProperty($field_name, $field_name); diff -u b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php --- b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php +++ b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php @@ -153,21 +153,21 @@ foreach ($fields[$node_type] as $field_name => $info) { $field_type = $info['type']; try { - $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); - if (!isset($this->cckPluginCache[$field_type])) { - $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($plugin_id, ['core' => 7], $migration); + $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); + if (!isset($this->fieldPluginCache[$field_type])) { + $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 7], $migration); } - $this->cckPluginCache[$field_type] - ->processCckFieldValues($migration, $field_name, $info); + $this->fieldPluginCache[$field_type] + ->processFieldValues($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { try { - $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); - if (!isset($this->fieldPluginCache[$field_type])) { - $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 7], $migration); + $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); + if (!isset($this->cckPluginCache[$field_type])) { + $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($plugin_id, ['core' => 7], $migration); } - $this->fieldPluginCache[$field_type] - ->processFieldValues($migration, $field_name, $info); + $this->cckPluginCache[$field_type] + ->processCckFieldValues($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { $migration->setProcessOfProperty($field_name, $field_name); diff -u b/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php b/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php --- b/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php +++ b/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php @@ -132,21 +132,21 @@ foreach ($fields[$bundle] as $field_name => $info) { $field_type = $info['type']; try { - $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); - if (!isset($this->cckPluginCache[$field_type])) { - $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($plugin_id, ['core' => 7], $migration); + $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); + if (!isset($this->fieldPluginCache[$field_type])) { + $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 7], $migration); } - $this->cckPluginCache[$field_type] - ->processCckFieldValues($migration, $field_name, $info); + $this->fieldPluginCache[$field_type] + ->processFieldValues($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { try { - $plugin_id = $this->fieldPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); - if (!isset($this->fieldPluginCache[$field_type])) { - $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 7], $migration); + $plugin_id = $this->cckPluginManager->getPluginIdFromFieldType($field_type, ['core' => 7], $migration); + if (!isset($this->cckPluginCache[$field_type])) { + $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($plugin_id, ['core' => 7], $migration); } - $this->fieldPluginCache[$field_type] - ->processFieldValues($migration, $field_name, $info); + $this->cckPluginCache[$field_type] + ->processCckFieldValues($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { $migration->setProcessOfProperty($field_name, $field_name); diff -u b/core/modules/user/src/Plugin/migrate/User.php b/core/modules/user/src/Plugin/migrate/User.php --- b/core/modules/user/src/Plugin/migrate/User.php +++ b/core/modules/user/src/Plugin/migrate/User.php @@ -30,22 +30,22 @@ if (empty($field_type)) { continue; } - if ($this->cckPluginManager->hasDefinition($field_type)) { - if (!isset($this->cckPluginCache[$field_type])) { - $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, [], $this); + if ($this->fieldPluginManager->hasDefinition($field_type)) { + if (!isset($this->fieldPluginCache[$field_type])) { + $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($field_type, [], $this); } $info = $row->getSource(); - $this->cckPluginCache[$field_type] - ->processCckFieldValues($this, $field_name, $info); + $this->fieldPluginCache[$field_type] + ->processFieldValues($this, $field_name, $info); } else { - if ($this->fieldPluginManager->hasDefinition($field_type)) { - if (!isset($this->fieldPluginCache[$field_type])) { - $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($field_type, [], $this); + if ($this->cckPluginManager->hasDefinition($field_type)) { + if (!isset($this->cckPluginCache[$field_type])) { + $this->cckPluginCache[$field_type] = $this->cckPluginManager->createInstance($field_type, [], $this); } $info = $row->getSource(); - $this->fieldPluginCache[$field_type] - ->processFieldValues($this, $field_name, $info); + $this->cckPluginCache[$field_type] + ->processCckFieldValues($this, $field_name, $info); } else { $this->process[$field_name] = $field_name;