Issue #3097476 by Meenakshi.g, andypost: Remove all @deprecated code in the Config translation module

merge-requests/2419/head
catch 2019-12-03 14:36:15 +00:00
parent 9868712457
commit 30ec97cb25
3 changed files with 1 additions and 102 deletions

View File

@ -1,21 +0,0 @@
<?php
namespace Drupal\config_translation\Plugin\migrate\source\d6;
@trigger_error('The ' . __NAMESPACE__ . '\I18nProfileField is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use ' . __NAMESPACE__ . '\ProfileFieldTranslation', E_USER_DEPRECATED);
/**
* i18n strings profile field source from database.
*
* @MigrateSource(
* id = "d6_i18n_profile_field",
* source_module = "i18nprofile"
* )
*
* @deprecated in drupal:8.4.0 and is removed from drupal:9.0.0. Use
* \Drupal\config_translation\Plugin\migrate\source\d6\ProfileFieldTranslation
* instead.
*
* @see https://www.drupal.org/node/2898649
*/
class I18nProfileField extends ProfileFieldTranslation {}

View File

@ -1,80 +0,0 @@
<?php
namespace Drupal\Tests\config_translation\Kernel\Plugin\migrate\source\d6;
use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
/**
* Tests the i18nProfileField source plugin.
*
* @covers \Drupal\config_translation\Plugin\migrate\source\d6\I18nProfileField
* @group migrate_drupal
* @group legacy
*/
class I18nProfileFieldTest extends MigrateSqlSourceTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['config_translation', 'migrate_drupal', 'user'];
/**
* {@inheritdoc}
*/
public function providerSource() {
$test = [];
$test[0]['source_data'] = [
'profile_fields' => [
[
'fid' => 42,
'title' => 'I love migrations',
'name' => 'profile_love_migrations',
],
],
'i18n_strings' => [
[
'lid' => 10,
'objectid' => 'profile_love_migrations',
'type' => 'field',
'property' => 'title',
],
[
'lid' => 11,
'objectid' => 'profile_love_migrations',
'type' => 'field',
'property' => 'explanation',
],
],
'locales_target' => [
[
'lid' => 10,
'translation' => "J'aime les migrations.",
'language' => 'fr',
],
[
'lid' => 11,
'translation' => 'Si vous cochez cette case, vous aimez les migrations.',
'language' => 'fr',
],
],
];
$test[0]['expected_results'] = [
[
'property' => 'title',
'translation' => "J'aime les migrations.",
'language' => 'fr',
'fid' => '42',
'name' => 'profile_love_migrations',
],
[
'property' => 'explanation',
'translation' => 'Si vous cochez cette case, vous aimez les migrations.',
'language' => 'fr',
'fid' => '42',
'name' => 'profile_love_migrations',
],
];
return $test;
}
}

View File

@ -40,7 +40,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
*
* @code
* source:
* plugin: d6_i18n_profile_field
* plugin: d6_profile_field_translation
* constants:
* entity_type: user
* bundle: user