The Drush 9 command service defined in token is using the id "devel.command", and therefore overwrites the actual devel commands if they're both installed. Let's just rename it to token.command.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

richard.thomas created an issue. See original summary.

jonathan1055’s picture

FileSize
288 bytes

Or better still, rename it token.commands: as it appears to be convention for commandS to be plural which also matches with the drush9 example module and other contrib drush.services.yml files.

nikitagupta’s picture

Assigned: Unassigned » nikitagupta
nikitagupta’s picture

Assigned: nikitagupta » Unassigned

patch #2 applied successfully and working fine. +RTBC

jonathan1055’s picture

@richard.thomas what did you use to see the namespace clash? I do not get any drush token commands listed. drush token: gives "There are no commands defined in the "token" namespace."

And to confuse things slightly, there is a devel command whihc lists the tokens devel:token List available tokens. This will remain in the devel namespace.

@nikitagupta, As there is no automated test coverage for the drush commands, this needs to be checked manually. Can you verify that without the patch and with Devel installed, you get the clash of namespace, and then with the patch applied you do not get the clash?

merlin06’s picture

@jonathon1055, The two png files show what I did to find the issue. After my search I had to assume token's drush.services.yml started as a bad copy&paste of devel's drush.services.yml. Service names in the codebase should never clash.

RoSk0’s picture

Version: 8.x-1.7 » 8.x-1.x-dev
Status: Needs review » Reviewed & tested by the community

Thanks for the patch!

Looks good to me.

jonathan_hunt’s picture

@merlin06 thanks for the patch. I can confirm that after applying the patch, drush devel:* commands are now available.

paulocs’s picture

FileSize
33.08 KB
42.89 KB

Assuming that devel module and token module have the save service id, patch #2 makes sense.

RTBC +1

Renrhaf’s picture

+1 Tested and reviewed, works fine

Berdir’s picture

Status: Reviewed & tested by the community » Fixed

Oops, fixed. Thanks.

  • Berdir committed 758411e on 8.x-1.x authored by jonathan1055
    Issue #3145527 by richard.thomas, jonathan1055, merlin06, paulocs: Drush...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.