diff --git a/core/modules/field/src/Plugin/migrate/process/FieldType.php b/core/modules/field/src/Plugin/migrate/process/FieldType.php index b9af0824be5..a4a0fb9d42d 100644 --- a/core/modules/field/src/Plugin/migrate/process/FieldType.php +++ b/core/modules/field/src/Plugin/migrate/process/FieldType.php @@ -8,7 +8,6 @@ use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Plugin\migrate\process\StaticMap; use Drupal\migrate\Row; -use Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -19,13 +18,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class FieldType extends StaticMap implements ContainerFactoryPluginInterface { - /** - * The cckfield plugin manager. - * - * @var \Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface - */ - protected $cckPluginManager; - /** * The field plugin manager. * @@ -49,16 +41,13 @@ class FieldType extends StaticMap implements ContainerFactoryPluginInterface { * The plugin ID. * @param mixed $plugin_definition * The plugin definition. - * @param \Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface $cck_plugin_manager - * The cckfield plugin manager. * @param \Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface $field_plugin_manager * The field plugin manager. * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration being run. */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrateCckFieldPluginManagerInterface $cck_plugin_manager, MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationInterface $migration = NULL) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationInterface $migration = NULL) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->cckPluginManager = $cck_plugin_manager; $this->fieldPluginManager = $field_plugin_manager; $this->migration = $migration; } @@ -71,7 +60,6 @@ class FieldType extends StaticMap implements ContainerFactoryPluginInterface { $configuration, $plugin_id, $plugin_definition, - $container->get('plugin.manager.migrate.cckfield'), $container->get('plugin.manager.migrate.field'), $migration ); @@ -87,13 +75,7 @@ class FieldType extends StaticMap implements ContainerFactoryPluginInterface { return $this->fieldPluginManager->createInstance($plugin_id, [], $this->migration)->getFieldType($row); } catch (PluginNotFoundException $e) { - try { - $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); - } + return parent::transform($value, $migrate_executable, $row, $destination_property); } } diff --git a/core/modules/field/src/Plugin/migrate/process/ProcessField.php b/core/modules/field/src/Plugin/migrate/process/ProcessField.php index c68acc9272d..a8272432287 100644 --- a/core/modules/field/src/Plugin/migrate/process/ProcessField.php +++ b/core/modules/field/src/Plugin/migrate/process/ProcessField.php @@ -9,7 +9,6 @@ use Drupal\migrate\MigrateExecutableInterface; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\ProcessPluginBase; use Drupal\migrate\Row; -use Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -44,13 +43,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class ProcessField extends ProcessPluginBase implements ContainerFactoryPluginInterface { - /** - * The cckfield plugin manager. - * - * @var \Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface - */ - protected $cckPluginManager; - /** * The field plugin manager. * @@ -74,16 +66,13 @@ class ProcessField extends ProcessPluginBase implements ContainerFactoryPluginIn * The plugin ID. * @param mixed $plugin_definition * The plugin definition. - * @param \Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface $cck_plugin_manager - * The cckfield plugin manager. * @param \Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface $field_plugin_manager * The field plugin manager. * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration being run. */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrateCckFieldPluginManagerInterface $cck_plugin_manager, MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationInterface $migration = NULL) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, MigrateFieldPluginManagerInterface $field_plugin_manager, MigrationInterface $migration = NULL) { parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->cckPluginManager = $cck_plugin_manager; $this->fieldPluginManager = $field_plugin_manager; $this->migration = $migration; } @@ -96,7 +85,6 @@ class ProcessField extends ProcessPluginBase implements ContainerFactoryPluginIn $configuration, $plugin_id, $plugin_definition, - $container->get('plugin.manager.migrate.cckfield'), $container->get('plugin.manager.migrate.field'), $migration ); @@ -119,12 +107,7 @@ class ProcessField extends ProcessPluginBase implements ContainerFactoryPluginIn return $this->callMethodOnFieldPlugin($this->fieldPluginManager, $value, $method, $row); } catch (PluginNotFoundException $e) { - try { - return $this->callMethodOnFieldPlugin($this->cckPluginManager, $value, $method, $row); - } - catch (PluginNotFoundException $e) { - return NULL; - } + return NULL; } } diff --git a/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php b/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php index 60fbbde1f84..dac718b6020 100644 --- a/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php +++ b/core/modules/field/tests/src/Unit/Plugin/migrate/process/ProcessFieldTest.php @@ -8,7 +8,6 @@ use Drupal\migrate\MigrateException; use Drupal\migrate\MigrateExecutable; use Drupal\migrate\Plugin\MigrationInterface; use Drupal\migrate\Row; -use Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldInterface; use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; use Drupal\Tests\migrate\Unit\MigrateTestCase; @@ -26,7 +25,6 @@ class ProcessFieldTest extends MigrateTestCase { * {@inheritdoc} */ protected function setUp() { - $this->cckFieldManager = $this->prophesize(MigrateCckFieldPluginManagerInterface::class); $this->fieldManager = $this->prophesize(MigrateFieldPluginManagerInterface::class); $this->fieldPlugin = $this->prophesize(MigrateFieldInterface::class); $this->migrateExecutable = $this->prophesize(MigrateExecutable::class); @@ -60,7 +58,7 @@ class ProcessFieldTest extends MigrateTestCase { if ($method) { $this->fieldPlugin->$method($this->row->reveal())->willReturn($expected_value); } - $this->plugin = new ProcessField(['method' => $method], $value, [], $this->cckFieldManager->reveal(), $this->fieldManager->reveal(), $this->migration->reveal()); + $this->plugin = new ProcessField(['method' => $method], $value, [], $this->fieldManager->reveal(), $this->migration->reveal()); if ($migrate_exception) { $this->expectException(MigrateException::class); @@ -69,7 +67,6 @@ class ProcessFieldTest extends MigrateTestCase { if ($plugin_not_found) { $exception = new PluginNotFoundException('foo'); - $this->cckFieldManager->getPluginIdFromFieldType()->willThrow($exception); $this->fieldManager->getPluginIdFromFieldType()->willThrow($exception); } diff --git a/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php b/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php deleted file mode 100644 index c583bc6201d..00000000000 --- a/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php +++ /dev/null @@ -1,67 +0,0 @@ - 'file_generic', - ]; - } - - /** - * {@inheritdoc} - */ - public function getFieldFormatterMap() { - return [ - 'default' => 'file_default', - 'url_plain' => 'file_url_plain', - 'path_plain' => 'file_url_plain', - 'image_plain' => 'image', - 'image_nodelink' => 'image', - 'image_imagelink' => 'image', - ]; - } - - /** - * {@inheritdoc} - */ - public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { - $process = [ - 'plugin' => 'd6_cck_file', - 'source' => $field_name, - ]; - $migration->mergeProcessOfProperty($field_name, $process); - } - - /** - * {@inheritdoc} - */ - public function getFieldType(Row $row) { - return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file'; - } - -} diff --git a/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php b/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php deleted file mode 100644 index cf745b92a0b..00000000000 --- a/core/modules/file/src/Plugin/migrate/cckfield/d7/FileField.php +++ /dev/null @@ -1,72 +0,0 @@ - 'file_generic', - ]; - } - - /** - * {@inheritdoc} - */ - public function getFieldFormatterMap() { - return [ - 'default' => 'file_default', - 'url_plain' => 'file_url_plain', - 'path_plain' => 'file_url_plain', - 'image_plain' => 'image', - 'image_nodelink' => 'image', - 'image_imagelink' => 'image', - ]; - } - - /** - * {@inheritdoc} - */ - public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { - $process = [ - 'plugin' => 'sub_process', - 'source' => $field_name, - 'process' => [ - 'target_id' => 'fid', - 'display' => 'display', - 'description' => 'description', - ], - ]; - $migration->mergeProcessOfProperty($field_name, $process); - } - - /** - * {@inheritdoc} - */ - public function getFieldType(Row $row) { - return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file'; - } - -} diff --git a/core/modules/file/src/Plugin/migrate/cckfield/d7/ImageField.php b/core/modules/file/src/Plugin/migrate/cckfield/d7/ImageField.php deleted file mode 100644 index d9e8e2c4805..00000000000 --- a/core/modules/file/src/Plugin/migrate/cckfield/d7/ImageField.php +++ /dev/null @@ -1,17 +0,0 @@ -container, [], 'custom_migration', []); - $cck_file_migration = CckFile::create($this->container, ['migration' => 'custom_file'], 'custom_file', [], $migration); - $config = $this->readAttribute($cck_file_migration, 'configuration'); - - $this->assertEquals($config['migration'], 'custom_file'); - } - -} 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 deleted file mode 100644 index 43d7959ec2f..00000000000 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d6/FileCckTest.php +++ /dev/null @@ -1,82 +0,0 @@ -plugin = new FileField([], 'file', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // 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(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessCckFieldValues() { - $this->plugin->processCckFieldValues($this->migration, 'somefieldname', []); - - $expected = [ - 'plugin' => 'd6_cck_file', - 'source' => 'somefieldname', - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - - /** - * Data provider for testGetFieldType(). - */ - public function getFieldTypeProvider() { - return [ - ['image', 'imagefield_widget'], - ['file', 'filefield_widget'], - ['file', 'x_widget'], - ]; - } - - /** - * @covers ::getFieldType - * @dataProvider getFieldTypeProvider - */ - public function testGetFieldType($expected_type, $widget_type, array $settings = []) { - $row = new Row(); - $row->setSourceProperty('widget_type', $widget_type); - $row->setSourceProperty('global_settings', $settings); - $this->assertSame($expected_type, $this->plugin->getFieldType($row)); - } - -} 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 deleted file mode 100644 index e47a5a93164..00000000000 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/FileCckTest.php +++ /dev/null @@ -1,87 +0,0 @@ -plugin = new FileField([], 'file', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // 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(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessCckFieldValues() { - $this->plugin->processCckFieldValues($this->migration, 'somefieldname', []); - - $expected = [ - 'plugin' => 'sub_process', - 'source' => 'somefieldname', - 'process' => [ - 'target_id' => 'fid', - 'display' => 'display', - 'description' => 'description', - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - - /** - * Data provider for testGetFieldType(). - */ - public function getFieldTypeProvider() { - return [ - ['image', 'imagefield_widget'], - ['file', 'filefield_widget'], - ['file', 'x_widget'], - ]; - } - - /** - * @covers ::getFieldType - * @dataProvider getFieldTypeProvider - */ - public function testGetFieldType($expected_type, $widget_type, array $settings = []) { - $row = new Row(); - $row->setSourceProperty('widget_type', $widget_type); - $row->setSourceProperty('global_settings', $settings); - $this->assertSame($expected_type, $this->plugin->getFieldType($row)); - } - -} 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 deleted file mode 100644 index b20d3d0f41c..00000000000 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/cckfield/d7/ImageCckTest.php +++ /dev/null @@ -1,66 +0,0 @@ -plugin = new ImageField([], 'image', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // 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(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessCckFieldValues() { - $this->plugin->processCckFieldValues($this->migration, 'somefieldname', []); - - $expected = [ - 'plugin' => 'sub_process', - 'source' => 'somefieldname', - 'process' => [ - 'target_id' => 'fid', - 'alt' => 'alt', - 'title' => 'title', - 'width' => 'width', - 'height' => 'height', - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - -} diff --git a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/CckFileTest.php b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/CckFileTest.php deleted file mode 100644 index e26849a677e..00000000000 --- a/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/CckFileTest.php +++ /dev/null @@ -1,60 +0,0 @@ -prophesize(MigrateLookupInterface::class); - $container = new ContainerBuilder(); - $container->set('migrate.lookup', $migrate_lookup->reveal()); - \Drupal::setContainer($container); - $executable = $this->prophesize(MigrateExecutableInterface::class)->reveal(); - $row = $this->prophesize(Row::class)->reveal(); - $migration = $this->prophesize(MigrationInterface::class)->reveal(); - - $migration_plugin = $this->prophesize(MigrateProcessInterface::class); - $migration_plugin->transform(1, $executable, $row, 'foo')->willReturn(1); - - $plugin = new CckFile([], 'd6_cck_file', [], $migration, $migration_plugin->reveal()); - - $options = [ - 'alt' => 'Foobaz', - 'title' => 'Wambooli', - ]; - $value = [ - 'fid' => 1, - 'list' => TRUE, - 'data' => serialize($options), - ]; - - $transformed = $plugin->transform($value, $executable, $row, 'foo'); - $expected = [ - 'target_id' => 1, - 'display' => TRUE, - 'description' => '', - 'alt' => 'Foobaz', - 'title' => 'Wambooli', - ]; - $this->assertSame($expected, $transformed); - } - -} diff --git a/core/modules/image/src/Plugin/migrate/cckfield/d7/ImageField.php b/core/modules/image/src/Plugin/migrate/cckfield/d7/ImageField.php deleted file mode 100644 index 52d442adf85..00000000000 --- a/core/modules/image/src/Plugin/migrate/cckfield/d7/ImageField.php +++ /dev/null @@ -1,43 +0,0 @@ - 'sub_process', - 'source' => $field_name, - 'process' => [ - 'target_id' => 'fid', - 'alt' => 'alt', - 'title' => 'title', - 'width' => 'width', - 'height' => 'height', - ], - ]; - $migration->mergeProcessOfProperty($field_name, $process); - } - -} diff --git a/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php deleted file mode 100644 index 3ee4b650ee8..00000000000 --- a/core/modules/link/src/Plugin/migrate/cckfield/LinkField.php +++ /dev/null @@ -1,57 +0,0 @@ - 'link', - 'plain' => 'link', - 'absolute' => 'link', - 'title_plain' => 'link', - 'url' => 'link', - 'short' => 'link', - 'label' => 'link', - 'separate' => 'link_separate', - ]; - } - - /** - * {@inheritdoc} - */ - public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) { - $process = [ - 'plugin' => 'd6_cck_link', - 'source' => $field_name, - ]; - $migration->mergeProcessOfProperty($field_name, $process); - } - -} diff --git a/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php b/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php deleted file mode 100644 index 5e13b955262..00000000000 --- a/core/modules/link/src/Plugin/migrate/cckfield/d7/LinkField.php +++ /dev/null @@ -1,57 +0,0 @@ - 'link_default']; - } - - /** - * @inheritdoc} - */ - public function alterFieldInstanceMigration(MigrationInterface $migration) { - $process = [ - 'plugin' => 'static_map', - 'source' => 'settings/title', - 'bypass' => TRUE, - 'map' => [ - 'disabled' => DRUPAL_DISABLED, - 'optional' => DRUPAL_OPTIONAL, - 'required' => DRUPAL_REQUIRED, - ], - ]; - $migration->mergeProcessOfProperty('settings/title', $process); - } - -} diff --git a/core/modules/link/src/Plugin/migrate/process/d6/CckLink.php b/core/modules/link/src/Plugin/migrate/process/d6/CckLink.php deleted file mode 100644 index 84cac57e3b4..00000000000 --- a/core/modules/link/src/Plugin/migrate/process/d6/CckLink.php +++ /dev/null @@ -1,17 +0,0 @@ -plugin = new LinkField([], 'link', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // 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(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - - $this->migration = $migration->reveal(); - } - - /** - * @covers ::alterFieldInstanceMigration - */ - public function testAlterFieldInstanceMigration($method = 'alterFieldInstanceMigration') { - $this->plugin->$method($this->migration); - - $expected = [ - 'plugin' => 'static_map', - 'source' => 'settings/title', - 'bypass' => TRUE, - 'map' => [ - 'disabled' => DRUPAL_DISABLED, - 'optional' => DRUPAL_OPTIONAL, - 'required' => DRUPAL_REQUIRED, - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - -} diff --git a/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php b/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php deleted file mode 100644 index fb4742ecac0..00000000000 --- a/core/modules/link/tests/src/Unit/Plugin/migrate/cckfield/LinkCckTest.php +++ /dev/null @@ -1,61 +0,0 @@ -plugin = new LinkField([], 'link', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // The plugin's processCckFieldValues() 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(). - $migration->mergeProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processCckFieldValues - * @expectedDeprecation LinkField is deprecated in Drupal 8.3.x and will be be removed before Drupal 9.0.x. Use \Drupal\link\Plugin\migrate\field\d6\LinkField instead. - */ - public function testProcessCckFieldValues() { - $this->plugin->processCckFieldValues($this->migration, 'somefieldname', []); - - $expected = [ - 'plugin' => 'd6_cck_link', - 'source' => 'somefieldname', - ]; - $this->assertSame($expected, $this->migration->getProcess()); - } - -} diff --git a/core/modules/migrate_drupal/migrate_drupal.services.yml b/core/modules/migrate_drupal/migrate_drupal.services.yml index 77a8b59dfd5..741ae970d7d 100644 --- a/core/modules/migrate_drupal/migrate_drupal.services.yml +++ b/core/modules/migrate_drupal/migrate_drupal.services.yml @@ -7,15 +7,6 @@ services: - '@cache.discovery' - '@module_handler' - '\Drupal\migrate_drupal\Annotation\MigrateField' - plugin.manager.migrate.cckfield: - class: Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManager - arguments: - - cckfield - - '@container.namespaces' - - '@cache.discovery' - - '@module_handler' - - '\Drupal\migrate_drupal\Annotation\MigrateCckField' - deprecated: The "%service_id%" service is deprecated. You should use the 'plugin.manager.migrate.field' service instead. See https://www.drupal.org/node/2751897 logger.channel.migrate_drupal: parent: logger.channel_base arguments: ['migrate_drupal'] diff --git a/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php b/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php deleted file mode 100644 index 5f6033aeabd..00000000000 --- a/core/modules/migrate_drupal/src/Annotation/MigrateCckField.php +++ /dev/null @@ -1,21 +0,0 @@ -setProcessOfProperty($field_name, $field_name); } } @@ -185,8 +171,8 @@ class FieldDiscovery implements FieldDiscoveryInterface { * @param \Drupal\migrate\Plugin\MigrationInterface $migration * The migration to retrieve the plugin for. * - * @return \Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface|\Drupal\migrate_drupal\Plugin\MigrateFieldInterface|bool - * The appropriate field or cck plugin to process this field type. + * @return \Drupal\migrate_drupal\Plugin\MigrateFieldInterface|bool + * The appropriate field plugin to process this field type. * * @throws \Drupal\Component\Plugin\Exception\PluginException * @throws \InvalidArgumentException @@ -199,17 +185,7 @@ class FieldDiscovery implements FieldDiscoveryInterface { $plugin = $this->fieldPluginManager->createInstance($plugin_id, ['core' => $core], $migration); } catch (PluginNotFoundException $ex) { - // @todo Replace try/catch block with $plugin = FALSE for Drupal 9. - // https://www.drupal.org/project/drupal/issues/3033733 - try { - /** @var \Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManager $cck_plugin_manager */ - $cck_plugin_manager = $this->getCckPluginManager(); - $plugin_id = $cck_plugin_manager->getPluginIdFromFieldType($field_type, ['core' => $core], $migration); - $plugin = $cck_plugin_manager->createInstance($plugin_id, ['core' => $core], $migration); - } - catch (PluginNotFoundException $ex) { - $plugin = FALSE; - } + $plugin = FALSE; } $this->fieldPluginCache[$core][$field_type] = $plugin; } @@ -289,23 +265,6 @@ class FieldDiscovery implements FieldDiscoveryInterface { return []; } - /** - * Gets the deprecated CCK Plugin Manager service as a BC shim. - * - * We don't inject this service directly because it is deprecated, and we - * don't want to instantiate the plugin manager unless we have to, to avoid - * triggering deprecation errors. - * - * @return \Drupal\migrate_drupal\Plugin\MigrateCckFieldPluginManagerInterface - * The CCK Plugin Manager. - */ - protected function getCckPluginManager() { - if (!$this->cckPluginManager) { - $this->cckPluginManager = \Drupal::service('plugin.manager.migrate.cckfield'); - } - return $this->cckPluginManager; - } - /** * Gets the source plugin to use to gather field information. * @@ -327,10 +286,10 @@ class FieldDiscovery implements FieldDiscoveryInterface { } catch (RequirementsException $e) { // If checkRequirements() failed, the source database did not support - // fields (i.e., CCK is not installed in D6 or Field is not installed in - // D7). Therefore, $fields will be empty and below we'll return an empty - // array. The migration will proceed without adding fields. - $this->logger->notice('Field discovery failed for Drupal core version @core. Did this site have the CCK or Field module installed? Error: @message', [ + // fields (i.e., Field is not installed in D7). Therefore, $fields will + // be empty and below we'll return an empty array. The migration will + // proceed without adding fields. + $this->logger->notice('Field discovery failed for Drupal core version @core. Did this site have the Field module installed? Error: @message', [ '@core' => $core, '@message' => $e->getMessage(), ]); diff --git a/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php b/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php deleted file mode 100644 index 2bebe92749f..00000000000 --- a/core/modules/migrate_drupal/src/Plugin/MigrateCckFieldInterface.php +++ /dev/null @@ -1,31 +0,0 @@ -processCckFieldValues($migration, $field_name, $data); - } - - /** - * Apply any custom processing to the field bundle migrations. - * - * @param \Drupal\migrate\Plugin\MigrationInterface $migration - * The migration entity. - * @param string $field_name - * The field name we're processing the value for. - * @param array $data - * The array of field data from FieldValues::fieldData(). - */ - abstract public function processCckFieldValues(MigrationInterface $migration, $field_name, $data); - -} diff --git a/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/migrate_cckfield_plugin_manager_test.info.yml b/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/migrate_cckfield_plugin_manager_test.info.yml deleted file mode 100644 index 550616331f1..00000000000 --- a/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/migrate_cckfield_plugin_manager_test.info.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: 'Migrate cck field plugin manager test' -type: module -description: 'Example module demonstrating the cck field plugin manager in the Migrate API.' -package: Testing -version: VERSION diff --git a/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/migrate_cckfield_plugin_manager_test.module b/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/migrate_cckfield_plugin_manager_test.module deleted file mode 100644 index 0cb89be3255..00000000000 --- a/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/migrate_cckfield_plugin_manager_test.module +++ /dev/null @@ -1,14 +0,0 @@ -setProcessOfProperty($field_name, [ - 'class' => static::class, - ]); - } - -} diff --git a/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/src/Plugin/migrate/cckfield/D6NoCoreVersionSpecified.php b/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/src/Plugin/migrate/cckfield/D6NoCoreVersionSpecified.php deleted file mode 100644 index 34bed95e08f..00000000000 --- a/core/modules/migrate_drupal/tests/modules/migrate_cckfield_plugin_manager_test/src/Plugin/migrate/cckfield/D6NoCoreVersionSpecified.php +++ /dev/null @@ -1,22 +0,0 @@ -container - ->get('plugin.manager.migration') - ->getDefinition('d6_node:story'); - - $this->assertSame(D6FileField::class, $migration['process']['field_test_filefield']['class']); - } - -} diff --git a/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php b/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php deleted file mode 100644 index 7eb68ba3389..00000000000 --- a/core/modules/migrate_drupal/tests/src/Kernel/MigrateCckFieldPluginManagerTest.php +++ /dev/null @@ -1,51 +0,0 @@ -assertSame('d6_file', $plugin_manager->getPluginIdFromFieldType('file', ['core' => 6])); - - try { - // If this test passes, getPluginIdFromFieldType will raise a - // PluginNotFoundException and we'll never reach fail(). - $plugin_manager->getPluginIdFromFieldType('d6_file', ['core' => 7]); - $this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.'); - } - catch (PluginNotFoundException $e) { - $this->assertSame($e->getMessage(), "Plugin ID 'd6_file' was not found."); - } - - // Test fallback when no core version is specified. - $this->assertSame('d6_no_core_version_specified', $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 6])); - - try { - // If this test passes, getPluginIdFromFieldType will raise a - // PluginNotFoundException and we'll never reach fail(). - $plugin_manager->getPluginIdFromFieldType('d6_no_core_version_specified', ['core' => 7]); - $this->fail('Expected Drupal\Component\Plugin\Exception\PluginNotFoundException.'); - } - catch (PluginNotFoundException $e) { - $this->assertSame($e->getMessage(), "Plugin ID 'd6_no_core_version_specified' was not found."); - } - } - -} diff --git a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php index d3ac665d647..adc21c1d3c6 100644 --- a/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php +++ b/core/modules/migrate_drupal/tests/src/Kernel/d7/FieldDiscoveryTest.php @@ -3,11 +3,8 @@ namespace Drupal\Tests\migrate_drupal\Kernel\d7; use Drupal\comment\Entity\CommentType; -use Drupal\Component\Plugin\Exception\PluginNotFoundException; use Drupal\field\Plugin\migrate\source\d7\FieldInstance; -use Drupal\migrate_drupal\FieldDiscovery; use Drupal\migrate_drupal\FieldDiscoveryInterface; -use Drupal\migrate_drupal\Plugin\MigrateFieldPluginManagerInterface; use Drupal\node\Entity\NodeType; use Drupal\taxonomy\Entity\Vocabulary; use Drupal\Tests\migrate_drupal\Traits\FieldDiscoveryTestTrait; @@ -308,59 +305,4 @@ class FieldDiscoveryTest extends MigrateDrupal7TestBase { ]); } - /** - * Tests the fallback to deprecated CCK Plugin Manager. - * - * @covers ::getCckPluginManager - * @group legacy - * @expectedDeprecation TextField is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\text\Plugin\migrate\field\d6\TextField or \Drupal\text\Plugin\migrate\field\d7\TextField instead. - * @expectedDeprecation 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. - * @expectedDeprecation MigrateCckFieldInterface is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField instead. - */ - public function testGetCckPluginManager() { - $definition = [ - 'migration_tags' => ['Drupal 7'], - ]; - $migration = $this->migrationPluginManager->createStubMigration($definition); - $field_plugin_manager = $this->prophesize(MigrateFieldPluginManagerInterface::class); - $field_plugin_manager->getPluginIdFromFieldType('text_long', ['core' => '7'], $migration)->willThrow(PluginNotFoundException::class); - $field_discovery = new FieldDiscovery($field_plugin_manager->reveal(), $this->migrationPluginManager, $this->logger); - $field_discovery->addBundleFieldProcesses($migration, 'comment', 'comment_node_page'); - $actual_process = $migration->getProcess(); - $expected_process = [ - 'comment_body' => [ - 0 => [ - 'plugin' => 'sub_process', - 'source' => 'comment_body', - 'process' => [ - 'value' => 'value', - 'format' => [ - 0 => [ - 'plugin' => 'static_map', - 'bypass' => TRUE, - 'source' => 'format', - 'map' => [ - 0 => NULL, - ], - ], - 1 => [ - 'plugin' => 'skip_on_empty', - 'method' => 'process', - ], - 2 => [ - 'plugin' => 'migration', - 'migration' => [ - 0 => 'd6_filter_format', - 1 => 'd7_filter_format', - ], - 'source' => 'format', - ], - ], - ], - ], - ], - ]; - $this->assertEquals($expected_process, $actual_process); - } - } diff --git a/core/modules/node/src/Plugin/migrate/source/d6/Node.php b/core/modules/node/src/Plugin/migrate/source/d6/Node.php index 2d43c3a1c86..a5018ffec7a 100644 --- a/core/modules/node/src/Plugin/migrate/source/d6/Node.php +++ b/core/modules/node/src/Plugin/migrate/source/d6/Node.php @@ -292,24 +292,6 @@ class Node extends DrupalSqlBase { } } - /** - * Retrieves raw field data for a node. - * - * @deprecated in drupal:8.2.0 and is removed from drupal:9.0.0. Use - * getFieldData() instead. - * - * @param array $field - * A field and instance definition from getFieldInfo(). - * @param \Drupal\migrate\Row $node - * The node. - * - * @return array - * The field values, keyed by delta. - */ - protected function getCckData(array $field, Row $node) { - return $this->getFieldData($field, $node); - } - /** * {@inheritdoc} */ diff --git a/core/modules/text/src/Plugin/migrate/cckfield/TextField.php b/core/modules/text/src/Plugin/migrate/cckfield/TextField.php deleted file mode 100644 index 092fd715353..00000000000 --- a/core/modules/text/src/Plugin/migrate/cckfield/TextField.php +++ /dev/null @@ -1,141 +0,0 @@ - 'text_textfield', - ]; - } - - /** - * {@inheritdoc} - */ - public function getFieldFormatterMap() { - return [ - 'default' => 'text_default', - 'trimmed' => 'text_trimmed', - 'plain' => 'basic_string', - ]; - } - - /** - * {@inheritdoc} - */ - public function processCckFieldValues(MigrationInterface $migration, $field_name, $field_info) { - $widget_type = isset($field_info['widget_type']) ? $field_info['widget_type'] : $field_info['widget']['type']; - - if ($widget_type == 'optionwidgets_onoff') { - $process = [ - 'value' => [ - 'plugin' => 'static_map', - 'source' => 'value', - 'default_value' => 0, - ], - ]; - - $checked_value = explode("\n", $field_info['global_settings']['allowed_values'])[1]; - if (strpos($checked_value, '|') !== FALSE) { - $checked_value = substr($checked_value, 0, strpos($checked_value, '|')); - } - $process['value']['map'][$checked_value] = 1; - } - else { - // See \Drupal\migrate_drupal\Plugin\migrate\source\d6\User::baseFields(), - // signature_format for an example of the YAML that represents this - // process array. - $process = [ - 'value' => 'value', - 'format' => [ - [ - 'plugin' => 'static_map', - 'bypass' => TRUE, - 'source' => 'format', - 'map' => [0 => NULL], - ], - [ - 'plugin' => 'skip_on_empty', - 'method' => 'process', - ], - [ - 'plugin' => 'migration', - 'migration' => [ - 'd6_filter_format', - 'd7_filter_format', - ], - 'source' => 'format', - ], - ], - ]; - } - - $process = [ - 'plugin' => 'sub_process', - 'source' => $field_name, - 'process' => $process, - ]; - $migration->setProcessOfProperty($field_name, $process); - } - - /** - * {@inheritdoc} - */ - public function getFieldType(Row $row) { - $widget_type = $row->getSourceProperty('widget_type'); - $settings = $row->getSourceProperty('global_settings'); - - if ($widget_type == 'text_textfield') { - $field_type = $settings['text_processing'] ? 'text' : 'string'; - if (empty($settings['max_length']) || $settings['max_length'] > 255) { - $field_type .= '_long'; - } - return $field_type; - } - - if ($widget_type == 'text_textarea') { - $field_type = $settings['text_processing'] ? 'text_long' : 'string_long'; - return $field_type; - } - - switch ($widget_type) { - case 'optionwidgets_buttons': - case 'optionwidgets_select': - return 'list_string'; - case 'optionwidgets_onoff': - return 'boolean'; - default: - return parent::getFieldType($row); - } - } - -} diff --git a/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php b/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php deleted file mode 100644 index 51ec9af9c83..00000000000 --- a/core/modules/text/tests/src/Unit/Migrate/TextCckTest.php +++ /dev/null @@ -1,167 +0,0 @@ -plugin = new TextField([], 'text', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // The plugin's processCckFieldValues() 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(). - $migration->setProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessFilteredTextFieldValues() { - $field_info = [ - 'widget_type' => 'text_textfield', - ]; - $this->plugin->processCckFieldValues($this->migration, 'body', $field_info); - - $process = $this->migration->getProcess(); - $this->assertSame('sub_process', $process['plugin']); - $this->assertSame('body', $process['source']); - $this->assertSame('value', $process['process']['value']); - - // Ensure that filter format IDs will be looked up in the filter format - // migrations. - $lookup = $process['process']['format'][2]; - $this->assertSame('migration', $lookup['plugin']); - $this->assertContains('d6_filter_format', $lookup['migration']); - $this->assertContains('d7_filter_format', $lookup['migration']); - $this->assertSame('format', $lookup['source']); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessBooleanTextImplicitValues() { - $info = [ - 'widget_type' => 'optionwidgets_onoff', - 'global_settings' => [ - 'allowed_values' => "foo\nbar", - ], - ]; - $this->plugin->processCckFieldValues($this->migration, 'field', $info); - - $expected = [ - 'value' => [ - 'plugin' => 'static_map', - 'source' => 'value', - 'default_value' => 0, - 'map' => [ - 'bar' => 1, - ], - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()['process']); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessBooleanTextExplicitValues() { - $info = [ - 'widget_type' => 'optionwidgets_onoff', - 'global_settings' => [ - 'allowed_values' => "foo|Foo\nbaz|Baz", - ], - ]; - $this->plugin->processCckFieldValues($this->migration, 'field', $info); - - $expected = [ - 'value' => [ - 'plugin' => 'static_map', - 'source' => 'value', - 'default_value' => 0, - 'map' => [ - 'baz' => 1, - ], - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()['process']); - } - - /** - * Data provider for testGetFieldType(). - */ - public function getFieldTypeProvider() { - return [ - ['string_long', 'text_textfield', ['text_processing' => FALSE]], - ['string', 'text_textfield', [ - 'text_processing' => FALSE, - 'max_length' => 128, - ], - ], - ['string_long', 'text_textfield', [ - 'text_processing' => FALSE, - 'max_length' => 4096, - ], - ], - ['text_long', 'text_textfield', ['text_processing' => TRUE]], - ['text', 'text_textfield', [ - 'text_processing' => TRUE, - 'max_length' => 128, - ], - ], - ['text_long', 'text_textfield', [ - 'text_processing' => TRUE, - 'max_length' => 4096, - ], - ], - ['list_string', 'optionwidgets_buttons'], - ['list_string', 'optionwidgets_select'], - ['boolean', 'optionwidgets_onoff'], - ['text_long', 'text_textarea', ['text_processing' => TRUE]], - ['string_long', 'text_textarea', ['text_processing' => FALSE]], - [NULL, 'undefined'], - ]; - } - - /** - * @covers ::getFieldType - * @dataProvider getFieldTypeProvider - */ - public function testGetFieldType($expected_type, $widget_type, array $settings = []) { - $row = new Row(['widget_type' => $widget_type], ['widget_type' => []]); - $row->setSourceProperty('global_settings', $settings); - $this->assertSame($expected_type, $this->plugin->getFieldType($row)); - } - -} diff --git a/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php b/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php deleted file mode 100644 index 696c34cba32..00000000000 --- a/core/modules/text/tests/src/Unit/Plugin/migrate/cckfield/TextCckTest.php +++ /dev/null @@ -1,167 +0,0 @@ -plugin = new TextField([], 'text', []); - - $migration = $this->prophesize(MigrationInterface::class); - - // The plugin's processCckFieldValues() 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(). - $migration->setProcessOfProperty(Argument::type('string'), Argument::type('array')) - ->will(function ($arguments) use ($migration) { - $migration->getProcess()->willReturn($arguments[1]); - }); - - $this->migration = $migration->reveal(); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessFilteredTextFieldValues() { - $field_info = [ - 'widget_type' => 'text_textfield', - ]; - $this->plugin->processCckFieldValues($this->migration, 'body', $field_info); - - $process = $this->migration->getProcess(); - $this->assertSame('sub_process', $process['plugin']); - $this->assertSame('body', $process['source']); - $this->assertSame('value', $process['process']['value']); - - // Ensure that filter format IDs will be looked up in the filter format - // migrations. - $lookup = $process['process']['format'][2]; - $this->assertSame('migration', $lookup['plugin']); - $this->assertContains('d6_filter_format', $lookup['migration']); - $this->assertContains('d7_filter_format', $lookup['migration']); - $this->assertSame('format', $lookup['source']); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessBooleanTextImplicitValues() { - $info = [ - 'widget_type' => 'optionwidgets_onoff', - 'global_settings' => [ - 'allowed_values' => "foo\nbar", - ], - ]; - $this->plugin->processCckFieldValues($this->migration, 'field', $info); - - $expected = [ - 'value' => [ - 'plugin' => 'static_map', - 'source' => 'value', - 'default_value' => 0, - 'map' => [ - 'bar' => 1, - ], - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()['process']); - } - - /** - * @covers ::processCckFieldValues - */ - public function testProcessBooleanTextExplicitValues() { - $info = [ - 'widget_type' => 'optionwidgets_onoff', - 'global_settings' => [ - 'allowed_values' => "foo|Foo\nbaz|Baz", - ], - ]; - $this->plugin->processCckFieldValues($this->migration, 'field', $info); - - $expected = [ - 'value' => [ - 'plugin' => 'static_map', - 'source' => 'value', - 'default_value' => 0, - 'map' => [ - 'baz' => 1, - ], - ], - ]; - $this->assertSame($expected, $this->migration->getProcess()['process']); - } - - /** - * Data provider for testGetFieldType(). - */ - public function getFieldTypeProvider() { - return [ - ['string_long', 'text_textfield', ['text_processing' => FALSE]], - ['string', 'text_textfield', [ - 'text_processing' => FALSE, - 'max_length' => 128, - ], - ], - ['string_long', 'text_textfield', [ - 'text_processing' => FALSE, - 'max_length' => 4096, - ], - ], - ['text_long', 'text_textfield', ['text_processing' => TRUE]], - ['text', 'text_textfield', [ - 'text_processing' => TRUE, - 'max_length' => 128, - ], - ], - ['text_long', 'text_textfield', [ - 'text_processing' => TRUE, - 'max_length' => 4096, - ], - ], - ['list_string', 'optionwidgets_buttons'], - ['list_string', 'optionwidgets_select'], - ['boolean', 'optionwidgets_onoff'], - ['text_long', 'text_textarea', ['text_processing' => TRUE]], - ['string_long', 'text_textarea', ['text_processing' => FALSE]], - [NULL, 'undefined'], - ]; - } - - /** - * @covers ::getFieldType - * @dataProvider getFieldTypeProvider - */ - public function testGetFieldType($expected_type, $widget_type, array $settings = []) { - $row = new Row(['widget_type' => $widget_type], ['widget_type' => []]); - $row->setSourceProperty('global_settings', $settings); - $this->assertSame($expected_type, $this->plugin->getFieldType($row)); - } - -} diff --git a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php index 88d6387aabd..a046cebb708 100644 --- a/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php +++ b/core/tests/Drupal/Tests/Listeners/DeprecationListenerTrait.php @@ -140,10 +140,6 @@ trait DeprecationListenerTrait { */ public static function getSkippedDeprecations() { return [ - 'MigrateCckField is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\migrate_drupal\Annotation\MigrateField instead.', - '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', 'Passing in arguments the legacy way is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Provide the right parameter names in the method, similar to controllers. See https://www.drupal.org/node/2894819', 'The "serializer.normalizer.file_entity.hal" normalizer service is deprecated: it is obsolete, it only remains available for backwards compatibility.', 'The Symfony\Component\ClassLoader\ApcClassLoader class is deprecated since Symfony 3.3 and will be removed in 4.0. Use `composer install --apcu-autoloader` instead.',