Commit 246ec168 authored by webchick's avatar webchick

Issue #2534042 by mikeryan, phenaproxima: Move module-specific migration...

Issue #2534042 by mikeryan, phenaproxima: Move module-specific migration support into the user module
parent c1e0ba38
......@@ -17,14 +17,6 @@ migrate.destination.config:
type: string
label: 'Configuration name'
migrate.destination.entity:user:
type: migrate_destination
label: 'User'
mapping:
md5_passwords:
type: boolean
label: 'Passwords'
migrate.destination.entity:file:
type: migrate_destination
label: 'Picture'
......
......@@ -20,6 +20,3 @@ services:
plugin.manager.migrate.id_map:
class: Drupal\migrate\Plugin\MigratePluginManager
arguments: [id_map, '@container.namespaces', '@cache.discovery', '@module_handler']
password_migrate:
class: Drupal\migrate\MigratePassword
arguments: ['@password_original']
......@@ -102,14 +102,6 @@ migrate.source.d6_comment_variable:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_profile_field:
type: migrate_source_sql
label: 'Drupal 6 profile field'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_field_formatter_settings:
type: migrate_source_sql
label: 'Drupal 6 field formatter settings'
......@@ -142,44 +134,6 @@ migrate.source.d6_field_instance_per_view_mode:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_user:
type: migrate_source_sql
label: 'Drupal 6 user'
mapping:
constants:
type: mapping
label: 'Constants'
mapping:
key:
type: string
label: 'User data key'
module:
type: string
label: 'Module name'
migrate.source.d6_user_picture_file:
type: migrate_source_sql
label: 'Drupal 6 user picure display'
mapping:
constants:
type: mapping
label: 'Constant'
mapping:
is_public:
type: boolean
label: 'Public'
migrate.source.d6_user_picture_instance:
type: migrate_source_sql
label: 'Drupal 6 user picure display'
mapping:
provider:
type: string
label: 'Provider'
constants:
type: migrate_entity_constant
label: 'Constants'
migrate_entity_constant:
type: mapping
mapping:
......
# Schema for the migrate destination plugin.
migrate.destination.entity:user:
type: migrate_destination
label: 'User'
mapping:
md5_passwords:
type: boolean
label: 'Passwords'
# Schema for the user module's migration source plugins.
migrate.source.d6_user:
type: migrate_source_sql
label: 'Drupal 6 user'
mapping:
constants:
type: mapping
label: 'Constants'
mapping:
key:
type: string
label: 'User data key'
module:
type: string
label: 'Module name'
migrate.source.d6_user_picture_file:
type: migrate_source_sql
label: 'Drupal 6 user picure display'
mapping:
constants:
type: mapping
label: 'Constant'
mapping:
is_public:
type: boolean
label: 'Public'
migrate.source.d6_user_picture_instance:
type: migrate_source_sql
label: 'Drupal 6 user picure display'
mapping:
provider:
type: string
label: 'Provider'
constants:
type: migrate_entity_constant
label: 'Constants'
migrate.source.d6_profile_field:
type: migrate_source_sql
label: 'Drupal 6 profile field'
mapping:
constants:
type: migrate_entity_constant
label: 'Constants'
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate\MigratePassword.
* Contains \Drupal\user\MigratePassword.
*/
namespace Drupal\migrate;
namespace Drupal\user;
use Drupal\Core\Password\PasswordInterface;
......@@ -81,4 +81,14 @@ public function disableMd5Prefixing() {
$this->enabled = FALSE;
}
/**
* Implements the PhpassHashedPassword::getCountLog2() method.
*
* @todo: Revisit this whole alternate password service:
* https://www.drupal.org/node/2540594.
*/
public function getCountLog2($setting) {
return $this->originalPassword->getCountLog2($setting);
}
}
......@@ -2,18 +2,18 @@
/**
* @file
* Contains \Drupal\migrate\Plugin\migrate\destination\EntityUser.
* Contains \Drupal\user\Plugin\migrate\destination\EntityUser.
*/
namespace Drupal\migrate\Plugin\migrate\destination;
namespace Drupal\user\Plugin\migrate\destination;
use Drupal\Core\Entity\EntityManagerInterface;
use Drupal\Core\Entity\EntityStorageInterface;
use Drupal\Core\Password\PasswordInterface;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\migrate\MigrateException;
use Drupal\migrate\MigratePassword;
use Drupal\migrate\Plugin\MigratePluginManager;
use Drupal\user\MigratePassword;
use Drupal\migrate\Plugin\migrate\destination\EntityContentBase;
use Drupal\migrate\Row;
use Symfony\Component\DependencyInjection\ContainerInterface;
......
......@@ -2,14 +2,15 @@
/**
* @file
* Contains \Drupal\migrate\Plugin\migrate\destination\UserData.
* Contains \Drupal\user\Plugin\migrate\destination\UserData.
*/
namespace Drupal\migrate\Plugin\migrate\destination;
namespace Drupal\user\Plugin\migrate\destination;
use Drupal\migrate\Entity\MigrationInterface;
use Drupal\user\UserData as UserDataStorage;
use Drupal\migrate\Row;
use Drupal\migrate\Plugin\migrate\destination\DestinationBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\ProfileFieldSettings.
* Contains \Drupal\user\Plugin\migrate\process\d6\ProfileFieldSettings.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
namespace Drupal\user\Plugin\migrate\process\d6;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\UserPicture.
* Contains \Drupal\user\Plugin\migrate\process\d6\UserPicture.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
namespace Drupal\user\Plugin\migrate\process\d6;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\migrate\Entity\MigrationInterface;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\UserUpdate7002.
* Contains \Drupal\user\Plugin\migrate\process\d6\UserUpdate7002.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
namespace Drupal\user\Plugin\migrate\process\d6;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\process\d6\UserUpdate8002.
* Contains \Drupal\user\Plugin\migrate\process\d6\UserUpdate8002.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\process\d6;
namespace Drupal\user\Plugin\migrate\process\d6;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\Row;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\ProfileField.
* Contains \Drupal\user\Plugin\migrate\source\d6\ProfileField.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
use Drupal\migrate\Row;
......
......@@ -2,17 +2,15 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\ProfileFieldValues.
* Contains \Drupal\user\Plugin\migrate\source\d6\ProfileFieldValues.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate\Row;
use Drupal\migrate\Plugin\SourceEntityInterface;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
/**
* Drupal 6 profile fields values source.
*
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\Role.
* Contains \Drupal\user\Plugin\migrate\source\d6\Role.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate\Row;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\User.
* Contains \Drupal\user\Plugin\migrate\source\d6\User.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate\Plugin\SourceEntityInterface;
use Drupal\migrate\Row;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPicture.
* Contains \Drupal\user\Plugin\migrate\source\d6\UserPicture.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPictureFile.
* Contains \Drupal\user\Plugin\migrate\source\d6\UserPictureFile.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
use Drupal\migrate\Row;
......
......@@ -2,10 +2,10 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Plugin\migrate\source\d6\UserPictureInstance.
* Contains \Drupal\user\Plugin\migrate\source\d6\UserPictureInstance.
*/
namespace Drupal\migrate_drupal\Plugin\migrate\source\d6;
namespace Drupal\user\Plugin\migrate\source\d6;
use Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase;
use Drupal\migrate\Plugin\migrate\source\DummyQueryTrait;
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserConfigsTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserConfigsTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\config\Tests\SchemaCheckTestTrait;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade variables to user.*.yml.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserConfigsTest extends MigrateDrupal6TestBase {
......
......@@ -2,15 +2,17 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserContactSettingsTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserContactSettingsTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Users contact settings migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserContactSettingsTest extends MigrateDrupal6TestBase {
......
......@@ -2,15 +2,17 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureEntityDisplayTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureEntityDisplayTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* User picture entity display.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserPictureEntityDisplayTest extends MigrateDrupal6TestBase {
......
......@@ -2,15 +2,17 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureEntityFormDisplayTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureEntityFormDisplayTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* User picture entity form display.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserPictureEntityFormDisplayTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureFieldTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureFieldTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* User picture field migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserPictureFieldTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureFileTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureFileTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\file\Entity\File;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* User pictures migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserPictureFileTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserPictureInstanceTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserPictureInstanceTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\field\Entity\FieldConfig;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* User picture field instance migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserPictureInstanceTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileEntityDisplayTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileEntityDisplayTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\Core\Database\Database;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Tests the user profile entity display migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserProfileEntityDisplayTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileEntityFormDisplayTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileEntityFormDisplayTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\Core\Database\Database;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Tests the user profile entity form display migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserProfileEntityFormDisplayTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileFieldInstanceTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileFieldInstanceTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\field\Entity\FieldConfig;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Tests the user profile field instance migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserProfileFieldInstanceTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileFieldTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileFieldTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\field\Entity\FieldStorageConfig;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Tests the user profile field migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserProfileFieldTest extends MigrateDrupal6TestBase {
......
......@@ -2,19 +2,19 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserProfileValuesTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserProfileValuesTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\migrate\MigrateExecutable;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
use Drupal\Core\Database\Database;
use Drupal\user\Entity\User;
/**
* User profile values migration.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserProfileValuesTest extends MigrateDrupal6TestBase {
......
......@@ -2,17 +2,18 @@
/**
* @file
* Contains \Drupal\migrate_drupal\Tests\d6\MigrateUserRoleTest.
* Contains \Drupal\user\Tests\Migrate\d6\MigrateUserRoleTest.
*/
namespace Drupal\migrate_drupal\Tests\d6;
namespace Drupal\user\Tests\Migrate\d6;
use Drupal\user\Entity\Role;
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
/**
* Upgrade user roles to user.role.*.yml.
*
* @group migrate_drupal
* @group user
*/
class MigrateUserRoleTest extends MigrateDrupal6TestBase {
......