Module vipps_mobilepay_commerce recognized by composer as metapackage

Created on 11 August 2024, about 1 year ago
Updated 27 August 2024, about 1 year ago

Problem/Motivation

I am the maintainer of the following modules:
- vipps_mobilepay
- vipps_mobilepay_commerce

At first, the latter module was a submodule under the former one, but with an intention to move it to its own repo at one point. I subsplited the directory of the module into its own git repository and pushed it to d.org. Unfortunately, since then I have been unable to install the module via composer as it is always seen as metapackage rather than drupal-module. I added composer.json to the module's repository trying to force composer package type but with no luck.

Here's a relevant part from installed.json:

{
            "name": "drupal/vipps_mobilepay_commerce",
            "version": "dev-1.0.x",
            "version_normalized": "dev-1.0.x",
            "require": {
                "drupal/commerce_payment": "*",
                "drupal/core": "^10 || ^11",
                "drupal/vipps_mobilepay": "*"
            },
            "type": "metapackage",
            "extra": {
                "branch-alias": {
                    "dev-1.0.x": "1.0.x-dev"
                },
                "drupal": {
                    "version": "1.0.x-dev",
                    "datestamp": "1723319009",
                    "security-coverage": {
                        "status": "not-covered",
                        "message": "Project has not opted into security advisory coverage!"
                    }
                }
            },
            "notification-url": "https://packages.drupal.org/8/downloads",
            "license": [
                "GPL-2.0-or-later"
            ],
            "authors": [
                {
                    "name": "zaporylie",
                    "homepage": "https://www.drupal.org/user/1532844"
                }
            ],
            "description": "Integrate Vipps MobilePay Merchant services with Drupal Commerce",
            "homepage": "https://www.drupal.org/project/vipps_mobilepay",
            "support": {
                "source": "https://git.drupalcode.org/project/vipps_mobilepay"
            },
            "install-path": null
        },

As you can see some references to vipps_mobilepay exist which is difficult to explain. I tried force-pushing to 1.0.x and rewriting history as I expect resuing objects with the same sha across 2 repositories is at the bottom of this problem but server hooks prevent me from doing that or deleting 1.0.x branch. Would be nice to have the history but I can live without it.

Module on git.drupalcode.org: https://git.drupalcode.org/project/vipps_mobilepay_commerce

Steps to reproduce

install the module on drupal 10+ with composer using

composer require drupal/vipps_mobilepay_commerce 1.0.x-dev
πŸ› Bug report
Status

Fixed

Version

1.0

Component

Namespace request

Created by

πŸ‡³πŸ‡΄Norway zaporylie

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

Comments & Activities

Production build 0.71.5 2024