You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If migration requirements are not met, then the following message is visible in Drush logs: [debug] Migration 'foo' is skipped as its source plugin has missed requirements: . [0.13 sec, 24.65 MB]
Requirements details are missing. Let's look at this code to understand why:
foreach ($migrations as $migrationId => $migration) {
try {
$sourcePlugin = $migration->getSourcePlugin();
if ($sourcePlugin instanceof RequirementsInterface) {
$sourcePlugin->checkRequirements();
}
} catch (RequirementsException $exception) {
$this->logger()->debug("Migration '{$migrationId}' is skipped as its source plugin has missed requirements: " . $exception->getRequirementsString());
unset($migrations[$migrationId]);
}
}
The problem is at $exception->getRequirementsString(), which returns an information about requirements array passed into the exception. This array is supposed to provide additional metadata and probably shouldn't be visible for developers. At least, I don't see any value in this information. That's why I opened a drupal.org issue to adjust the message format as well: https://www.drupal.org/project/drupal/issues/3254986. Feel free to check it out to see more details.
Speaking of Drush commands, if requirements were passed as 2nd argument, the message is the following: Migration 'd6_comment' is skipped as its source plugin has missed requirements: source_module: comment.
Otherwise, the message is: Migration 'user_profile_field_instance' is skipped as its source plugin has missed requirements: .
To Reproduce
Install latest Drupal core (9.4.x);
Install Migrate Drupal module;
Run drush ms user_profile_field_instance -vvv
Expected behavior
I would expect the following message (with or without the requirements array): Migration 'd6_comment' is skipped as its source plugin has missed requirements: The module comment is not enabled in the source site.
Actual behavior Migration 'd6_comment' is skipped as its source plugin has missed requirements: source_module: comment.
The text was updated successfully, but these errors were encountered:
Describe the bug
If migration requirements are not met, then the following message is visible in Drush logs:
[debug] Migration 'foo' is skipped as its source plugin has missed requirements: . [0.13 sec, 24.65 MB]
Requirements details are missing. Let's look at this code to understand why:
The problem is at
$exception->getRequirementsString()
, which returns an information about requirements array passed into the exception. This array is supposed to provide additional metadata and probably shouldn't be visible for developers. At least, I don't see any value in this information. That's why I opened a drupal.org issue to adjust the message format as well: https://www.drupal.org/project/drupal/issues/3254986. Feel free to check it out to see more details.Speaking of Drush commands, if requirements were passed as 2nd argument, the message is the following:
Migration 'd6_comment' is skipped as its source plugin has missed requirements: source_module: comment.
Otherwise, the message is:
Migration 'user_profile_field_instance' is skipped as its source plugin has missed requirements: .
To Reproduce
drush ms user_profile_field_instance -vvv
Expected behavior
I would expect the following message (with or without the requirements array):
Migration 'd6_comment' is skipped as its source plugin has missed requirements: The module comment is not enabled in the source site.
Actual behavior
Migration 'd6_comment' is skipped as its source plugin has missed requirements: source_module: comment.
The text was updated successfully, but these errors were encountered: