Composer command on project page incorrectly repeats project name

Created on 5 August 2025, 27 days ago

Problem/Motivation

The project page for Analyze AI Sentiment β†’ is displaying an incorrect Composer command.

Instead of:

composer require 'drupal/analyze_ai_sentiment:^1.0@beta'

It shows:

composer require 'drupal/analyze_ai_sentiment-analyze_ai_sentiment:^1.0@beta'

This affects all releases and seems to stem from how the packaging system determines the project name.

Steps to reproduce

  1. Go to: https://www.drupal.org/project/analyze_ai_sentiment β†’
  2. Observe the Composer command listed under the latest release.

Proposed resolution

The packaging logic on Drupal.org should generate:

composer require 'drupal/analyze_ai_sentiment:^1.0@beta'

based on the valid analyze_ai_sentiment.info.yml and composer.json:

  • type: module is defined.
  • The .info.yml file name matches the project machine name.
  • The composer.json includes "name": "drupal/analyze_ai_sentiment".
  • The repo structure is normal and clean.

No packaging metadata override should cause a doubling of the project name in the generated Composer command.

Remaining tasks

  • Confirm whether this is a general packaging bug or specific to this project.
  • Fix the packaging logic to avoid this issue.
  • Regenerate the Composer command display for the project page.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Active

Component

Packaging

Created by

πŸ‡³πŸ‡±Netherlands jurriaanroelofs

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

Comments & Activities

  • Issue created by @jurriaanroelofs
  • πŸ‡ΊπŸ‡ΈUnited States cmlara

    See 🌱 Change how modules and submodule dependencies are handled to have more consistent namepsaces [DRAFT]. Active for the long story on this and how sub modules can steal composer namespaces (and related proposal to prevent this from occurring)

    See πŸ’¬ Submodule created a package Active where a similar request was most recently rejected.

    $ composer show -a drupal/analyze_ai_sentiment
    name     : drupal/analyze_ai_sentiment
    descrip. : A submodule for Analyze that provides AI-powered sentiment analysis capabilities.
    keywords : 
    versions : 1.0.x-dev, dev-1.0.x
    type     : metapackage
    license  : GNU General Public License v2.0 or later (GPL-2.0-or-later) (OSI approved) https://spdx.org/licenses/GPL-2.0-or-later.html#licenseText
    homepage : https://www.drupal.org/project/analyze
    source   : []  
    dist     : []  
    names    : drupal/analyze_ai_sentiment
    
    support
    source : https://git.drupalcode.org/project/analyze
    

    Infra has the final say, however I would suggest (based on prior actions) you be prepared to consider either being stuck with the duplicate name, or consider abandoning the namespace to choose a new (non-duplicated) name.

  • πŸ‡³πŸ‡±Netherlands jurriaanroelofs

    Thanks for the quick update. I hope we can get the name deduplicated, I've already had developers spend hours in confusion over the "wrong" module path causing bugs so I will prepare to move into a new namespace if infra's policy is not to help change this, no big deal.

  • πŸ‡ΊπŸ‡ΈUnited States drumm NY, US

    This is by design, not a bug, and a rename can be considered on a case-by-case basis. The composer namespace does not always match the project name.

  • πŸ‡³πŸ‡±Netherlands jurriaanroelofs

    ok thx for the update, I will create a new project

Production build 0.71.5 2024