diff -u b/core/lib/Drupal/Core/Field/Plugin/migrate/field/Email.php b/core/lib/Drupal/Core/Field/Plugin/migrate/field/Email.php --- b/core/lib/Drupal/Core/Field/Plugin/migrate/field/Email.php +++ b/core/lib/Drupal/Core/Field/Plugin/migrate/field/Email.php @@ -40,14 +40,6 @@ } /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * defineValueProcessPipeline() instead. - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - return $this->defineValueProcessPipeline($migration, $field_name, $data); - } - - /** * {@inheritdoc} */ public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) { diff -u b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php --- b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php +++ b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php @@ -30,8 +30,16 @@ $this->setExpectedException(MigrateException::class, "Field field_date of type 'timestamp' is an unknown date field type."); $this->plugin->defineValueProcessPipeline($this->migration, 'field_date', ['type' => 'timestamp']); + } + + /** + * This calls the deprecated processFieldValues() method to test backwards + * compatibility. + */ + public function testUnknownDateTypeBackwardsCompatibility() { + $this->migration = $this->prophesize('Drupal\migrate\Plugin\MigrationInterface')->reveal(); + $this->plugin = new DateField([], '', []); - // Retain backwards compatibility testing. $this->setExpectedException(MigrateException::class, "Field field_date of type 'timestamp' is an unknown date field type."); $this->plugin->processFieldValues($this->migration, 'field_date', ['type' => 'timestamp']); } diff -u b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/d6/DateFieldTest.php b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/d6/DateFieldTest.php --- b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/d6/DateFieldTest.php +++ b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/d6/DateFieldTest.php @@ -31,6 +31,15 @@ $this->setExpectedException(MigrateException::class, "Field field_date of type 'timestamp' is an unknown date field type."); $this->plugin->defineValueProcessPipeline($this->migration, 'field_date', ['type' => 'timestamp']); + } + + /** + * This calls the deprecated processFieldValues() method to test backwards + * compatibility. + */ + public function testUnknownDateTypeBackwardsCompatibility() { + $this->migration = $this->prophesize('Drupal\migrate\Plugin\MigrationInterface')->reveal(); + $this->plugin = new DateField([], '', []); // Retain backwards compatibility testing. $this->setExpectedException(MigrateException::class, "Field field_date of type 'timestamp' is an unknown date field type."); diff -u b/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php b/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php --- b/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php +++ b/core/modules/file/src/Plugin/migrate/field/d7/ImageField.php @@ -16,14 +16,6 @@ class ImageField extends FieldPluginBase { /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * defineValueProcessPipeline() instead. - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - return $this->defineValueProcessPipeline($migration, $field_name, $data); - } - - /** * {@inheritdoc} */ public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) { diff -u b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php --- b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php @@ -37,14 +37,6 @@ return ['link_field' => 'link_default']; } - /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * alterFieldInstanceMigration() instead. - */ - public function processFieldInstance(MigrationInterface $migration) { - $this->alterFieldInstanceMigration($migration); - } - public function alterFieldInstanceMigration(MigrationInterface $migration) { $process = [ 'plugin' => 'static_map', diff -u b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php --- b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php @@ -37,14 +37,6 @@ } /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * defineValueProcessPipeline() instead. - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - return $this->defineValueProcessPipeline($migration, $field_name, $data); - } - - /** * {@inheritdoc} */ public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) { diff -u b/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php b/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php --- b/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php @@ -31,13 +31,8 @@ } /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * alterFieldInstanceMigration() instead. + * {@inheritdoc} */ - public function processFieldInstance(MigrationInterface $migration) { - $this->alterFieldInstanceMigration($migration); - } - public function alterFieldInstanceMigration(MigrationInterface $migration) { $process = [ 'plugin' => 'static_map', diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php @@ -20,38 +20,63 @@ abstract class FieldPluginBase extends PluginBase implements MigrateFieldInterface { /** + * Alters the migration for field definitions. + * * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use * alterFieldMigration() instead. + * + * @see ::alterFieldMigration() */ public function processField(MigrationInterface $migration) { + @trigger_error( 'Deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use + * alterFieldMigration() instead.', E_USER_DEPRECATED); $this->alterFieldMigration($migration); } + /** + * {@inheritdoc} + */ public function alterFieldMigration(MigrationInterface $migration) { $process[0]['map'][$this->pluginId][$this->pluginId] = $this->pluginId; $migration->mergeProcessOfProperty('type', $process); } /** + * Alert field instance migration. + * * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use * alterFieldInstanceMigration() instead. + * + * @see ::alterFieldInstanceMigration() */ public function processFieldInstance(MigrationInterface $migration) { + @trigger_error( 'Deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use + * alterFieldInstanceMigration() instead.', E_USER_DEPRECATED); $this->alterFieldInstanceMigration($migration); } + /** + * {@inheritdoc} + */ public function alterFieldInstanceMigration(MigrationInterface $migration) { // Nothing to do by default with field instances. } /** + * Alter field widget migration. + * * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use * alterFieldWidgetMigration() instead. + * + * @see ::alterFieldWidgetMigration() */ public function processFieldWidget(MigrationInterface $migration) { $this->alterFieldWidgetMigration($migration); } + /** + * {@inheritdoc} + */ public function alterFieldWidgetMigration(MigrationInterface $migration) { $process = []; foreach ($this->getFieldWidgetMap() as $source_widget => $destination_widget) { @@ -92,16 +117,20 @@ } /** + * Alter field formatter migration. + * * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use * alterFieldFormatterMigration() instead. + * + * @see ::processFieldFormatter() */ public function processFieldFormatter(MigrationInterface $migration) { + @trigger_error('in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use alterFieldFormatterMigration() instead.', E_USER_DEPRECATED); $this->alterFieldFormatterMigration($migration); } public function alterFieldFormatterMigration(MigrationInterface $migration) { $process = []; - // Some migrate field plugin IDs are prefixed with 'd6_' or 'd7_'. Since the // plugin ID is used in the static map as the module name, we have to remove // this prefix from the plugin ID. @@ -113,10 +142,15 @@ } /** + * Defines the process pipeline for field values. + * * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use * defineValueProcessPipeline() instead. + * + * @see ::defineValueProcessPipeline() */ public function processFieldValues(MigrationInterface $migration, $field_name, $data) { + @trigger_error('Deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use defineValueProcessPipeline() instead.', E_USER_DEPRECATED); return $this->defineValueProcessPipeline($migration, $field_name, $data); } diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/NodeReference.php @@ -18,14 +18,6 @@ class NodeReference extends FieldPluginBase { /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * defineValueProcessPipeline() instead. - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - return $this->defineValueProcessPipeline($migration, $field_name, $data); - } - - /** * {@inheritdoc} */ public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) { diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/UserReference.php @@ -18,14 +18,6 @@ class UserReference extends FieldPluginBase { /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * defineValueProcessPipeline() instead. - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - return $this->defineValueProcessPipeline($migration, $field_name, $data); - } - - /** * {@inheritdoc} */ public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) { diff -u b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php --- b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php +++ b/core/modules/taxonomy/src/Plugin/migrate/field/TaxonomyTermReference.php @@ -19,14 +19,6 @@ class TaxonomyTermReference extends FieldPluginBase { /** - * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use - * defineValueProcessPipeline() instead. - */ - public function processFieldValues(MigrationInterface $migration, $field_name, $data) { - return $this->defineValueProcessPipeline($migration, $field_name, $data); - } - - /** * {@inheritdoc} */ public function defineValueProcessPipeline(MigrationInterface $migration, $field_name, $data) {