Why does MigrateToolsCommands::migrationsList() utilize MigrationPluginManager to instantiate all plugins ?

Created on 1 November 2024, about 2 months ago

When using the migrate:status drush command without specific migration IDs, MigrateToolsCommands::migrationsList() utilizes the MigrationPluginManager to instantiate all plugins as seen here

    if (empty($migration_ids)) {
      // Get all migrations.
      $plugins = $manager->createInstances([]);
      $matched_migrations = $plugins;
    }

Why would this be useful?

Wouldn't it be more direct to use something like (e.g. using dependency injection) the following to all available migrations?

$migrations = \Drupal::EntityTypeManager()->getStorage('migration')->loadMultiple();
$migration_ids = implode(',', array_keys($migrations));
πŸ’¬ Support request
Status

Active

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States jasonawant New Orleans, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024