Composer name for matomo_onpage_metrics module seems to be wrong

Created on 22 January 2025, about 2 months ago

I made a release for the module https://www.drupal.org/project/matomo_onpage_metrics . See https://www.drupal.org/project/matomo_onpage_metrics/releases

The composer name for this module seems to be wrong. The command shown on https://www.drupal.org/project/matomo_onpage_metrics says
composer require 'drupal/matomo_onpage_metrics-matomo_onpage_metrics:^1.0@beta'

Also when I execute this locally:
ddev composer require "drupal/matomo_onpage_metrics:1.0.0-beta1"
the package can not be found. I get this message:

"Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires drupal/matomo_onpage_metrics 1.0.0-beta1 (exact version match), found drupal/matomo_onpage_metrics[dev-1.0.x, 1.0.x-dev (alias of dev-1.0.x)] but it does not match the constraint."

Something is not completely OK.

What preceded this problem is the following:

Me and my colleagues created the project https://www.drupal.org/project/mom for the contrib module, but the code uses the name matomo_onpage_metrics in all files. So matomo_onpage_metrics.info.yml, matomo_onpage_metrics.module et cetera.
We discussed and decided it was better to call the module matomo_onpage_metrics instead of "mom".
I created the new project and removed all info and code from the mom project.
I deleted the .git folder locally and pushed the code according to the instructions on https://www.drupal.org/project/matomo_onpage_metrics/git-instructions
Somewhere a mistake must have happened resulting in the problem I described above.

Can you see if this is something you can fix?

If necessary, please delete both mom and matomo_onpage_metrics. Then I start from scratch. I have a copy of all the information in the project pages.

💬 Support request
Status

Active

Component

Other

Created by

🇳🇱Netherlands batigolix Utrecht

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

Comments & Activities

  • Issue created by @batigolix
  • 🇮🇳India vishal.kadam Mumbai

    Projects with releases cannot be deleted.

    Regarding your issue, it seems your Drupal core’s composer.json file has the minimum-stability set to stable. Try changing it to dev and see if it resolves the problem.

  • 🇳🇱Netherlands batigolix Utrecht

    Where did you see my core composer json file?

  • 🇺🇸United States cmlara

    @vishal.kadam this is a well known issue on D.O that has nothing to do with stability levels.

    @batigolix 🌱 Change how modules and submodule dependencies are handled to have more consistent namepsaces [DRAFT]. Active has some related discussions about a long term fix for this (though there appears to be no movement to resolve this long term).

    The short version is the MOM project (likely) now has control of the namespace as it had a project with that module name first.

    You can move this to Drupal infrastructure and ask them to rename, no gurantee they will, however they have in the past.

  • 🇳🇱Netherlands batigolix Utrecht
  • 🇳🇱Netherlands batigolix Utrecht

    I updated the description and move this to the Infrastructure queue.

    Thanks @cmlara & vishal for your help.

  • 🇺🇸United States drumm NY, US

    This is working as designed to disambiguate components in modules, since Composer resolves dependencies on the project level, and Drupal also handles dependencies among sub-modules and other components within a single project. Composer namespaces do not always equal project names.

    Using the Composer command exactly as on the release and project page, composer require 'drupal/matomo_onpage_metrics-matomo_onpage_metrics:^1.0@beta' does work as expected.

Production build 0.71.5 2024