Command "migrate" is ambiguous in Topics section when using --help flag

Created on 13 August 2023, over 1 year ago
Updated 18 September 2024, 2 months ago

Problem/Motivation

When using the --help flag on a command, a Command "migrate" is ambiguous. error appears in the Topics section. Additionally, the command aliases are no longer listed. While this error could be dismissed given that help data is printed, you might need to scroll up to actually see it. It is disorienting to see the error as it gives the impression the command failed altogether. This happens for Drush 11 and 12.

For reference, this is the output when migrate_tools is not installed.

Steps to reproduce

Run drush migrate:import --help

🐛 Bug report
Status

Needs work

Version

6.0

Component

Code

Created by

🇳🇮Nicaragua dinarcon

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

Comments & Activities

  • Issue created by @dinarcon
  • 🇬🇧United Kingdom joachim

    The problem seems to be caused by this line:

    > #[CLI\Topics(topics: ['migrate'])]

    If I remove it then the problem goes away.

    I'm not sure what it's supposed to refer to, as AFAICT there aren't any Drush topics in the Migrate Tools module, and the Drush migrate topic is specifically NOT about Migrate Tools.

  • 🇬🇧United Kingdom joachim

    It looks like it's a bug in Drush 11. In Drush 12 it's fine.

  • Status changed to Needs review 12 months ago
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.x + Environment: PHP 8.1 & MySQL 8
    last update 12 months ago
    36 pass
  • heddn Nicaragua

    Fixing the error mentioned here and getting rid of a deprecation error

  • 🇺🇸United States lpeabody

    This is still happening for me with Drush 12, and the patch doesn't apply.

  • 🇺🇸United States lpeabody

    This patch applies cleanly for me on 6.0.4.

  • Status changed to Needs work 2 months ago
  • 🇬🇧United Kingdom joachim

    Seeing this on Drush 13.

    +++ b/src/Drush/Commands/MigrateToolsCommands.php
    @@ -127,7 +126,7 @@ public function dependencyTree($migration_names = '', array $options = [
    -      $migration_dependencies = $migration->getMigrationDependencies();
    +      $migration_dependencies = $migration->getMigrationDependencies(TRUE);
    

    This looks like an unrelated change.

Production build 0.71.5 2024