diff --git a/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php index 6b7f137..1d846f0 100644 --- a/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php +++ b/core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php @@ -29,7 +29,7 @@ public function testUnknownDateType() { $this->plugin = new DateField([], '', []); $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']); + $this->plugin->defineValueProcessPipeline($this->migration, 'field_date', ['type' => 'timestamp']); } } diff --git a/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 index 7e67881..4c50ef5 100644 --- a/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 @@ -30,7 +30,7 @@ public function testUnknownDateType() { $this->plugin = new DateField([], '', []); $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']); + $this->plugin->defineValueProcessPipeline($this->migration, 'field_date', ['type' => 'timestamp']); } } diff --git a/core/modules/field/migrations/d6_field.yml b/core/modules/field/migrations/d6_field.yml index 92c28b2..b387d1f 100644 --- a/core/modules/field/migrations/d6_field.yml +++ b/core/modules/field/migrations/d6_field.yml @@ -3,7 +3,7 @@ label: Field configuration migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processField +field_plugin_method: alterFieldMigration source: plugin: d6_field constants: diff --git a/core/modules/field/migrations/d6_field_formatter_settings.yml b/core/modules/field/migrations/d6_field_formatter_settings.yml index fc97ad0..8a24060 100644 --- a/core/modules/field/migrations/d6_field_formatter_settings.yml +++ b/core/modules/field/migrations/d6_field_formatter_settings.yml @@ -3,7 +3,7 @@ label: Field formatter configuration migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processFieldFormatter +field_plugin_method: alterFieldFormatterMigration source: plugin: d6_field_instance_per_view_mode constants: diff --git a/core/modules/field/migrations/d6_field_instance.yml b/core/modules/field/migrations/d6_field_instance.yml index 3a413c1..9a99a7a 100644 --- a/core/modules/field/migrations/d6_field_instance.yml +++ b/core/modules/field/migrations/d6_field_instance.yml @@ -3,7 +3,7 @@ label: Field instance configuration migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processFieldInstance +field_plugin_method: alterFieldInstanceMigration source: plugin: d6_field_instance constants: diff --git a/core/modules/field/migrations/d6_field_instance_widget_settings.yml b/core/modules/field/migrations/d6_field_instance_widget_settings.yml index b5f6f6d..a5b0554 100644 --- a/core/modules/field/migrations/d6_field_instance_widget_settings.yml +++ b/core/modules/field/migrations/d6_field_instance_widget_settings.yml @@ -3,7 +3,7 @@ label: Field instance widget configuration migration_tags: - Drupal 6 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processFieldWidget +field_plugin_method: alterFieldWidgetMigration source: plugin: d6_field_instance_per_form_display constants: diff --git a/core/modules/field/migrations/d7_field.yml b/core/modules/field/migrations/d7_field.yml index 1fa0069..5c8028e 100644 --- a/core/modules/field/migrations/d7_field.yml +++ b/core/modules/field/migrations/d7_field.yml @@ -3,7 +3,7 @@ label: Field configuration migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processField +field_plugin_method: alterFieldMigration source: plugin: d7_field constants: diff --git a/core/modules/field/migrations/d7_field_formatter_settings.yml b/core/modules/field/migrations/d7_field_formatter_settings.yml index 5c9335c..5f98f63 100644 --- a/core/modules/field/migrations/d7_field_formatter_settings.yml +++ b/core/modules/field/migrations/d7_field_formatter_settings.yml @@ -3,7 +3,7 @@ label: Field formatter configuration migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processFieldFormatter +field_plugin_method: alterFieldFormatterMigration source: plugin: d7_field_instance_per_view_mode constants: diff --git a/core/modules/field/migrations/d7_field_instance.yml b/core/modules/field/migrations/d7_field_instance.yml index 4e1901d..fbd338e 100644 --- a/core/modules/field/migrations/d7_field_instance.yml +++ b/core/modules/field/migrations/d7_field_instance.yml @@ -3,7 +3,7 @@ label: Field instance configuration migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processFieldInstance +field_plugin_method: alterFieldInstanceMigration source: plugin: d7_field_instance constants: diff --git a/core/modules/field/migrations/d7_field_instance_widget_settings.yml b/core/modules/field/migrations/d7_field_instance_widget_settings.yml index ac281e1..10d70a7 100644 --- a/core/modules/field/migrations/d7_field_instance_widget_settings.yml +++ b/core/modules/field/migrations/d7_field_instance_widget_settings.yml @@ -3,7 +3,7 @@ label: Field instance widget configuration migration_tags: - Drupal 7 class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration -field_plugin_method: processFieldWidget +field_plugin_method: alterFieldWidgetMigration source: plugin: d7_field_instance_per_form_display constants: diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d6/FileCckTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d6/FileCckTest.php index 6a393df..eb5fe06 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d6/FileCckTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d6/FileCckTest.php @@ -33,7 +33,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/FileCckTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/FileCckTest.php index 9478b32..bce016b 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/FileCckTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/FileCckTest.php @@ -33,7 +33,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/ImageCckTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/ImageCckTest.php index 06695e4..2a47fdd 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/ImageCckTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/ImageCckTest.php @@ -32,7 +32,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php index 70f6d60..2e5894e 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d6/FileFieldTest.php @@ -32,7 +32,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). @@ -44,10 +44,10 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ - public function testProcessFieldValues() { - $this->plugin->processFieldValues($this->migration, 'somefieldname', []); + public function testDefineValueProcessPipeline() { + $this->plugin->defineValueProcessPipeline($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'd6_field_file', diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php index e774382..de269fe 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/FileFieldTest.php @@ -32,7 +32,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). @@ -44,10 +44,10 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ - public function testProcessFieldValues() { - $this->plugin->processFieldValues($this->migration, 'somefieldname', []); + public function testDefineValueProcessPipeline() { + $this->plugin->defineValueProcessPipeline($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'iterator', diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/ImageFieldTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/ImageFieldTest.php index fd11800..b37df43 100644 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/ImageFieldTest.php +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/field/d7/ImageFieldTest.php @@ -31,7 +31,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). @@ -43,10 +43,10 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ - public function testProcessFieldValues() { - $this->plugin->processFieldValues($this->migration, 'somefieldname', []); + public function testDefineValueProcessPipeline() { + $this->plugin->defineValueProcessPipeline($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'iterator', diff --git a/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php index f902987..1a823f5 100644 --- a/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php @@ -29,8 +29,8 @@ class LinkField extends CckFieldPluginBase { * {@inheritdoc} */ public function getFieldFormatterMap() { - // See d6_field_formatter_settings.yml and CckFieldPluginBase - // processFieldFormatter(). + // See d6_field_formatter_settings.yml and FieldPluginBase + // alterFieldFormatterMigration(). return [ 'default' => 'link', 'plain' => 'link', diff --git a/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php index c4f09f2..802bf9a 100644 --- a/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php @@ -38,9 +38,14 @@ public function getFieldWidgetMap() { } /** - * {@inheritdoc} + * @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', 'source' => 'settings/title', diff --git a/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php index 4c05f90..a948ef8 100644 --- a/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/field/d6/LinkField.php @@ -23,7 +23,7 @@ class LinkField extends FieldPluginBase { */ public function getFieldFormatterMap() { // See d6_field_formatter_settings.yml and FieldPluginBase - // processFieldFormatter(). + // alterFieldFormatterMigration(). return [ 'default' => 'link', 'plain' => 'link', diff --git a/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php b/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php index 0dcf4c6..317d3c1 100644 --- a/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php +++ b/core/modules/link/src/Plugin/migrate/field/d7/LinkField.php @@ -31,9 +31,14 @@ public function getFieldWidgetMap() { } /** - * {@inheritdoc} + * @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', 'source' => 'settings/title', diff --git a/core/modules/link/tests/src/Kernel/Plugin/migrate/cckfield/d7/LinkCckTest.php b/core/modules/link/tests/src/Kernel/Plugin/migrate/cckfield/d7/LinkCckTest.php index 896c15c..b0c7f0a 100644 --- a/core/modules/link/tests/src/Kernel/Plugin/migrate/cckfield/d7/LinkCckTest.php +++ b/core/modules/link/tests/src/Kernel/Plugin/migrate/cckfield/d7/LinkCckTest.php @@ -39,7 +39,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldInstance() method will call + // The plugin's alterFieldInstanceMigration() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). @@ -52,10 +52,10 @@ protected function setUp() { } /** - * @covers ::processCckFieldValues + * @covers ::alterFieldInstanceMigration */ - public function testProcessCckFieldValues() { - $this->plugin->processFieldInstance($this->migration); + public function testAlterFieldInstanceMigration() { + $this->plugin->alterFieldInstanceMigration($this->migration); $expected = [ 'plugin' => 'static_map', diff --git a/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php b/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php index 494aa02..280ed45b 100644 --- a/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php +++ b/core/modules/link/tests/src/Kernel/Plugin/migrate/field/d7/LinkFieldTest.php @@ -38,7 +38,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's ProcessFieldInstance() method will call + // The plugin's alterFieldInstanceMigration() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). @@ -51,10 +51,10 @@ protected function setUp() { } /** - * @covers ::processFieldInstance + * @covers ::alterFieldInstanceMigration */ - public function testProcessFieldInstance() { - $this->plugin->processFieldInstance($this->migration); + public function testAlterFieldInstanceMigration() { + $this->plugin->alterFieldInstanceMigration($this->migration); $expected = [ 'plugin' => 'static_map', diff --git a/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php index 0dbc741..201b652 100644 --- a/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php +++ b/core/modules/link/tests/src/Unit/Plugin/migrate/field/d6/LinkFieldTest.php @@ -31,7 +31,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // mergeProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to mergeProcessOfProperty(). @@ -44,10 +44,10 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ - public function testProcessFieldValues() { - $this->plugin->processFieldValues($this->migration, 'somefieldname', []); + public function testDefineValueProcessPipeline() { + $this->plugin->defineValueProcessPipeline($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'field_link', diff --git a/core/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php b/core/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php index 37c3cf2..96ed53e 100644 --- a/core/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php +++ b/core/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php @@ -17,7 +17,7 @@ * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration entity. */ - public function processField(MigrationInterface $migration); + public function alterFieldMigration(MigrationInterface $migration); /** * Apply any custom processing to the field instance migration. @@ -25,7 +25,7 @@ public function processField(MigrationInterface $migration); * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration entity. */ - public function processFieldInstance(MigrationInterface $migration); + public function alterFieldInstanceMigration(MigrationInterface $migration); /** * Apply any custom processing to the field widget migration. @@ -33,7 +33,7 @@ public function processFieldInstance(MigrationInterface $migration); * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration entity. */ - public function processFieldWidget(MigrationInterface $migration); + public function alterFieldWidgetMigration(MigrationInterface $migration); /** * Apply any custom processing to the field formatter migration. @@ -41,7 +41,7 @@ public function processFieldWidget(MigrationInterface $migration); * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration entity. */ - public function processFieldFormatter(MigrationInterface $migration); + public function alterFieldFormatterMigration(MigrationInterface $migration); /** * Get the field formatter type from the source. @@ -57,7 +57,7 @@ public function getFieldFormatterType(Row $row); /** * Get a map between D6 formatters and D8 formatters for this field type. * - * This is used by static::processFieldFormatter() in the base class. + * This is used by static::alterFieldFormatterMigration() in the base class. * * @return array * The keys are D6 formatters and the values are D8 formatters. diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php index e2c8ff6..ba89e12 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/field/FieldPluginBase.php @@ -20,24 +20,39 @@ abstract class FieldPluginBase extends PluginBase implements MigrateFieldInterface { /** - * {@inheritdoc} + * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use + * alterFieldMigration() instead. */ public function processField(MigrationInterface $migration) { + $this->alterFieldMigration($migration); + } + + public function alterFieldMigration(MigrationInterface $migration) { $process[0]['map'][$this->pluginId][$this->pluginId] = $this->pluginId; $migration->mergeProcessOfProperty('type', $process); } /** - * {@inheritdoc} + * @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) { // Nothing to do by default with field instances. } /** - * {@inheritdoc} + * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use + * alterFieldWidgetMigration() instead. */ public function processFieldWidget(MigrationInterface $migration) { + $this->alterFieldWidgetMigration($migration); + } + + public function alterFieldWidgetMigration(MigrationInterface $migration) { $process = []; foreach ($this->getFieldWidgetMap() as $source_widget => $destination_widget) { $process['type']['map'][$source_widget] = $destination_widget; @@ -77,9 +92,14 @@ public function getFieldWidgetMap() { } /** - * {@inheritdoc} + * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.x. Use + * alterFieldFormatterMigration() instead. */ public function processFieldFormatter(MigrationInterface $migration) { + $this->alterFieldFormatterMigration($migration); + } + + public function alterFieldFormatterMigration(MigrationInterface $migration) { $process = []; // Some migrate field plugin IDs are prefixed with 'd6_' or 'd7_'. Since the diff --git a/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php index 536303e..94c759b 100644 --- a/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php +++ b/core/modules/node/src/Plugin/migrate/D6NodeDeriver.php @@ -165,7 +165,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 6], $migration); } $this->fieldPluginCache[$field_type] - ->processFieldValues($migration, $field_name, $info); + ->defineValueProcessPipeline($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { try { diff --git a/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php index 28c61b8..25099cf 100644 --- a/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php +++ b/core/modules/node/src/Plugin/migrate/D7NodeDeriver.php @@ -168,7 +168,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 7], $migration); } $this->fieldPluginCache[$field_type] - ->processFieldValues($migration, $field_name, $info); + ->defineValueProcessPipeline($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { try { diff --git a/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php b/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php index 561a9af..566cf3b 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php +++ b/core/modules/taxonomy/src/Plugin/migrate/D7TaxonomyTermDeriver.php @@ -137,7 +137,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { $this->fieldPluginCache[$field_type] = $this->fieldPluginManager->createInstance($plugin_id, ['core' => 7], $migration); } $this->fieldPluginCache[$field_type] - ->processFieldValues($migration, $field_name, $info); + ->defineValueProcessPipeline($migration, $field_name, $info); } catch (PluginNotFoundException $ex) { try { diff --git a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/cckfield/TaxonomyTermReferenceCckTest.php b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/cckfield/TaxonomyTermReferenceCckTest.php index 981969f..8e5147c 100644 --- a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/cckfield/TaxonomyTermReferenceCckTest.php +++ b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/cckfield/TaxonomyTermReferenceCckTest.php @@ -48,7 +48,7 @@ protected function setUp() { * @covers ::processCckFieldValues */ public function testProcessCckFieldValues() { - $this->plugin->processFieldValues($this->migration, 'somefieldname', []); + $this->plugin->defineValueProcessPipeline($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'iterator', diff --git a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php index 974fc15..17aec9b 100644 --- a/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php +++ b/core/modules/taxonomy/tests/src/Unit/Plugin/migrate/field/TaxonomyTermReferenceFieldTest.php @@ -31,7 +31,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // setProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to setProcessOfProperty(). @@ -44,10 +44,10 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ - public function testProcessFieldValues() { - $this->plugin->processFieldValues($this->migration, 'somefieldname', []); + public function testDefineValueProcessPipeline() { + $this->plugin->defineValueProcessPipeline($this->migration, 'somefieldname', []); $expected = [ 'plugin' => 'iterator', diff --git a/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php index a49b9af..7125df5 100644 --- a/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Migrate/d6/TextFieldTest.php @@ -33,7 +33,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // setProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to setProcessOfProperty(). @@ -46,13 +46,13 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ public function testProcessFilteredTextFieldValues() { $field_info = [ 'widget_type' => 'text_textfield', ]; - $this->plugin->processFieldValues($this->migration, 'body', $field_info); + $this->plugin->defineValueProcessPipeline($this->migration, 'body', $field_info); $process = $this->migration->getProcess(); $this->assertSame('iterator', $process['plugin']); @@ -69,7 +69,7 @@ public function testProcessFilteredTextFieldValues() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ public function testProcessBooleanTextImplicitValues() { $info = [ @@ -78,7 +78,7 @@ public function testProcessBooleanTextImplicitValues() { 'allowed_values' => "foo\nbar", ] ]; - $this->plugin->processFieldValues($this->migration, 'field', $info); + $this->plugin->defineValueProcessPipeline($this->migration, 'field', $info); $expected = [ 'value' => [ @@ -94,7 +94,7 @@ public function testProcessBooleanTextImplicitValues() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ public function testProcessBooleanTextExplicitValues() { $info = [ @@ -103,7 +103,7 @@ public function testProcessBooleanTextExplicitValues() { 'allowed_values' => "foo|Foo\nbaz|Baz", ] ]; - $this->plugin->processFieldValues($this->migration, 'field', $info); + $this->plugin->defineValueProcessPipeline($this->migration, 'field', $info); $expected = [ 'value' => [ diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php index 8363989..f9315e0 100644 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php +++ b/core/modules/text/tests/src/Unit/Plugin/migrate/field/d6/TextFieldTest.php @@ -32,7 +32,7 @@ protected function setUp() { $migration = $this->prophesize(MigrationInterface::class); - // The plugin's processFieldValues() method will call + // The plugin's defineValueProcessPipeline() method will call // setProcessOfProperty() and return nothing. So, in order to examine the // process pipeline created by the plugin, we need to ensure that // getProcess() always returns the last input to setProcessOfProperty(). @@ -45,13 +45,13 @@ protected function setUp() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ public function testProcessFilteredTextFieldValues() { $field_info = [ 'widget_type' => 'text_textfield', ]; - $this->plugin->processFieldValues($this->migration, 'body', $field_info); + $this->plugin->defineValueProcessPipeline($this->migration, 'body', $field_info); $process = $this->migration->getProcess(); $this->assertSame('iterator', $process['plugin']); @@ -68,7 +68,7 @@ public function testProcessFilteredTextFieldValues() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ public function testProcessBooleanTextImplicitValues() { $info = [ @@ -77,7 +77,7 @@ public function testProcessBooleanTextImplicitValues() { 'allowed_values' => "foo\nbar", ] ]; - $this->plugin->processFieldValues($this->migration, 'field', $info); + $this->plugin->defineValueProcessPipeline($this->migration, 'field', $info); $expected = [ 'value' => [ @@ -93,7 +93,7 @@ public function testProcessBooleanTextImplicitValues() { } /** - * @covers ::processFieldValues + * @covers ::defineValueProcessPipeline */ public function testProcessBooleanTextExplicitValues() { $info = [ @@ -102,7 +102,7 @@ public function testProcessBooleanTextExplicitValues() { 'allowed_values' => "foo|Foo\nbaz|Baz", ] ]; - $this->plugin->processFieldValues($this->migration, 'field', $info); + $this->plugin->defineValueProcessPipeline($this->migration, 'field', $info); $expected = [ 'value' => [ diff --git a/core/modules/user/src/Plugin/migrate/User.php b/core/modules/user/src/Plugin/migrate/User.php index 0605443..2029747 100644 --- a/core/modules/user/src/Plugin/migrate/User.php +++ b/core/modules/user/src/Plugin/migrate/User.php @@ -36,7 +36,7 @@ public function getProcess() { } $info = $row->getSource(); $this->fieldPluginCache[$field_type] - ->processFieldValues($this, $field_name, $info); + ->defineValueProcessPipeline($this, $field_name, $info); } else { if ($this->cckPluginManager->hasDefinition($field_type)) {