Composer install of dev is wrong or at least confusing

Created on 17 May 2024, about 1 year ago
Updated 18 May 2024, about 1 year ago

Problem/Motivation

I found a problem in module "grant": Composer install is failling Fixed
Because I copied the strategy to use as "base" module additional to the main module but did a little bit different. So I also tried to user composer for installing composer dev version. There is currently more result than on grant but composer is also here doing something strange with teh sub module versions as you can see below.

 composer require 'drupal/tome:1.x-dev@dev'
./composer.json has been updated
Running composer update drupal/tome
Gathering patches for root package.
> DrupalProject\composer\ScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
  - Locking drupal/tome (dev-1.x ec6aae3)
  - Locking drupal/tome_base (1.12.0)
  - Locking drupal/tome_static (1.12.0)
  - Locking drupal/tome_sync (1.12.0)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Syncing drupal/tome (dev-1.x ec6aae3) into cache
Gathering patches for root package.
Gathering patches for dependencies. This might take a minute.
  - Installing drupal/tome_base (1.12.0)
  - Installing drupal/tome (dev-1.x ec6aae3): Cloning ec6aae332f from cache
  - Installing drupal/tome_sync (1.12.0)
  - Installing drupal/tome_static (1.12.0)

Even if the code of the sub modules is in dem which I didn't checked yet this is very confusing.

Steps to reproduce

Try composer require 'drupal/tome:1.x-dev@dev'

Proposed resolution

-

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany c-logemann Frankfurt/M, Germany

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

Comments & Activities

  • Issue created by @c-logemann
  • 🇩🇪Germany c-logemann Frankfurt/M, Germany
  • 🇩🇪Germany c-logemann Frankfurt/M, Germany
  • 🇩🇪Germany c-logemann Frankfurt/M, Germany

    The related issue is solved because there was just an overseen "minimum-stability" value in project composer.json. After changing to "dev" the grant module was installing. But the tome module still has the same confusing report. Comparing to grant module there is a big difference which probably the cause. Grant has a working module in main namespace which has a dependency on grant:grant_base defined in grant.info.yml. Because there is nothing defined in composer.json I wonder how composer "knows" about the sub modules in modules folder. I think in this composer interpretation of the situation there is an answer an maybe a composer based solution to fix this behavior in tome without changing the current sub module strategy.

    Because there was a change in the following file about catch command I looked int this file:
    modules/tome_static/src/EventSubscriber/RoutePathSubscriber.php
    and found this:
    catch (\Throwable $e) {

    So it seems this correct dev version code but composer shows installing current stable version "1.12.0". So it' still confusing.

Production build 0.71.5 2024