Problem/Motivation
The project lives at drupal.org/project/dtk and the composer package is drupal/dtk, but the module's machine name in code is drush_dtk. This violates Drupal's naming convention where the project short name, directory name, .info.yml filename, and PSR-4 namespace must all match.
Problem
When installing via Composer (composer require drupal/dtk), the package installs to modules/contrib/dtk/, but the module's .info.yml is named drush_dtk.info.yml. This creates a mismatch:
- Project/package name:
dtk - Install directory:
modules/contrib/dtk/ - Module machine name:
drush_dtk - Expected machine name:
dtk
Because Drupal's extension discovery relies on the directory name matching the .info.yml filename, the module won't be found by Drupal after a Composer install unless the directory is manually renamed or Composer is configured with an installer-paths override.
The drush en drush_dtk command in the README won't work out of the box with a standard Composer-managed install — Drupal will look for drush_dtk.info.yml inside a directory named drush_dtk, but the package installs into a dtk directory.
Steps to reproduce
composer require drupal/dtkdrush en drush_dtk- Observe: module not found
Proposed resolution
Rename the module machine name from drush_dtk to dtk:
drush_dtk.info.yml → dtk.info.yml
drush_dtk.module → dtk.module (if applicable)
Update any service definitions, hook implementations, and the PSR-4 namespace from Drupal\drush_dtk to Drupal\dtk
Update the README installation instructions to drush en dtk
Alternatively, if drush_dtk is the intended machine name, the project short name on drupal.org should be changed to match (i.e., drupal.org/project/drush_dtk), though this is harder to change after initial creation.
Remaining tasks
User interface changes
API changes
Data model changes
Issue fork dtk-3609408
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
michaellander commentedComment #3
gxleano commentedComment #4
gxleano commentedThanks Michael to report this issue, I will try to solve this asap
Comment #6
gxleano commentedComment #8
marcus_johansson commentedLooks good - getting merge
Comment #10
gxleano commented