diff --git a/core/modules/migrate/src/Entity/MigrationInterface.php b/core/modules/migrate/src/Entity/MigrationInterface.php index 8e7f986..7bb4c1a 100644 --- a/core/modules/migrate/src/Entity/MigrationInterface.php +++ b/core/modules/migrate/src/Entity/MigrationInterface.php @@ -97,6 +97,11 @@ */ const RESULT_DISABLED = 6; + /** + * An alias for getPluginId() for backwards compatibility reasons. + * + * @return string + */ public function id(); /** diff --git a/core/modules/migrate/src/MigrateExecutable.php b/core/modules/migrate/src/MigrateExecutable.php index f6215fe..b8304be 100644 --- a/core/modules/migrate/src/MigrateExecutable.php +++ b/core/modules/migrate/src/MigrateExecutable.php @@ -186,6 +186,7 @@ public function import() { // Knock off migration if the requirements haven't been met. try { + // @TODO https://www.drupal.org/node/2666640 #$this->migration->checkRequirements(); } catch (RequirementsException $e) { diff --git a/core/modules/migrate/src/Plugin/Migration.php b/core/modules/migrate/src/Plugin/Migration.php index f804542..9117f4e 100644 --- a/core/modules/migrate/src/Plugin/Migration.php +++ b/core/modules/migrate/src/Plugin/Migration.php @@ -249,10 +249,7 @@ public function __construct(array $configuration, $plugin_id, array $plugin_defi } /** - * Gets the plugin_id of the plugin instance. - * - * @return string - * The plugin_id of the plugin instance. + * {@inheritdoc} */ public function id() { return $this->pluginId; diff --git a/core/modules/migrate/src/Tests/MigrateTestBase.php b/core/modules/migrate/src/Tests/MigrateTestBase.php index e6cb24e..8dacfb6 100644 --- a/core/modules/migrate/src/Tests/MigrateTestBase.php +++ b/core/modules/migrate/src/Tests/MigrateTestBase.php @@ -149,7 +149,7 @@ protected function prepareMigrations(array $id_mappings) { */ protected function executeMigration($migration) { if (is_string($migration)) { - $this->migration = $this->container->get('plugin.manager.migration')->createInstance($migration); + $this->migration = $this->getMigration($migration); } else { $this->migration = $migration; @@ -218,7 +218,7 @@ public function stopCollectingMessages() { */ protected function mockFailure($migration, array $row, $status = MigrateIdMapInterface::STATUS_FAILED) { if (is_string($migration)) { - $migration = $this->container->get('plugin.manager.migration')->createInstance($migration); + $migration = $this->getMigration($migration); } /** @var \Drupal\migrate\Entity\MigrationInterface $migration */ $destination = array_map(function() { return NULL; }, $migration->getDestinationPlugin()->getIds()); diff --git a/core/modules/migrate_drupal/src/Plugin/migrate/CckMigration.php b/core/modules/migrate_drupal/src/Plugin/migrate/CckMigration.php index 6883178..42cec25 100644 --- a/core/modules/migrate_drupal/src/Plugin/migrate/CckMigration.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/CckMigration.php @@ -7,11 +7,11 @@ namespace Drupal\migrate_drupal\Plugin\migrate; -use Drupal\Component\Plugin\PluginManagerInterface; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\migrate\Exception\RequirementsException; use Drupal\migrate\Plugin\MigratePluginManager; use Drupal\migrate\Plugin\Migration; +use Drupal\migrate\Plugin\MigrationPluginManagerInterface; use Drupal\migrate\Plugin\RequirementsInterface; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -60,7 +60,7 @@ class CckMigration extends Migration implements ContainerFactoryPluginInterface * @param \Drupal\migrate\Plugin\MigratePluginManager $cck_manager * The cckfield plugin manager. */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, MigratePluginManager $cck_manager, PluginManagerInterface $migration_plugin_manager) { + public function __construct(array $configuration, $plugin_id, $plugin_definition, MigratePluginManager $cck_manager, MigrationPluginManagerInterface $migration_plugin_manager) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->cckPluginManager = $cck_manager; $this->migrationPluginManager = $migration_plugin_manager; diff --git a/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php index e545433..485eeb0 100644 --- a/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php +++ b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php @@ -58,6 +58,7 @@ protected function loadFixture($path) { * Drupal version as provided in migration_tags - e.g., 'Drupal 6'. */ protected function installMigrations($version) { + // @TODO https://www.drupal.org/node/2668436 return; $migration_templates = \Drupal::service('migrate.template_storage')->findTemplatesByTag($version); $migrations = \Drupal::service('migrate.migration_builder')->createMigrations($migration_templates); diff --git a/core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php b/core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php index 8749256..de5930a 100644 --- a/core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php +++ b/core/modules/taxonomy/src/Plugin/migrate/D6TermNodeDeriver.php @@ -49,7 +49,7 @@ public function getDerivativeDefinitions($base_plugin_definition, $base_plugin_d } } catch (\Exception $e) { - + // @TODO https://www.drupal.org/node/2666640 } return $this->derivatives; } diff --git a/core/modules/user/src/Plugin/migrate/User.php b/core/modules/user/src/Plugin/migrate/User.php index 3f04a78..a828299 100644 --- a/core/modules/user/src/Plugin/migrate/User.php +++ b/core/modules/user/src/Plugin/migrate/User.php @@ -52,6 +52,7 @@ public function getProcess() { } } catch (RequirementsException $e) { + // @TODO https://www.drupal.org/node/2666640 } } return parent::getProcess();