Parse composer.json for the project name for update module

Created on 28 August 2015, almost 10 years ago
Updated 5 July 2025, 7 days ago

If a module is installed with git (either via composer or not) it does not include the relevant elements in info.yml for update.module to detect updates.

The d.o packager currently adds a number of items, for example:

# Information added by Drupal.org packaging script on 2015-08-09
version: '8.x-1.x-dev'
core: '8.x'
project: 'devel'
datestamp: 1439140152

The core element should be added by module developers anyway. The project element seems to be the "key" here as it matches the module to the d.o project name, without this nothing will show on the updates page. version and datestamp are the two elements which are used to determine the version currently being used.

This issue needs a lot of discussion about possible solutions. One would be for module maintainers to add all the items, however I'm sure there are better solutions.

Update: due to complexities of getting the module version this issue has digressed to initially just getting the project element, this can be derived from the name in compoer.json.

πŸ“Œ Task
Status

Needs work

Version

11.0 πŸ”₯

Component

update.module

Created by

πŸ‡¬πŸ‡§United Kingdom timmillwood 🏴󠁧󠁒󠁷󠁬󠁳󠁿 Wales, UK

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    A followup issue from the great git migration got marked outdated recently, which, fair enough. The remaining scope of it was that dev versions od modules deployed with git deploy and then composer did't work with update.php. This looked like the modern home of that although this seems to only about naming, rather htan version numbers, abd to be yet another duplicate in a chain?

    Is there an infra issue for #38?

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    My clever retitle of one of the related issues is a little misleading about just what old technical debt this is, and that the issue has survived not only multiple deployment best practices but also multiple d.do packaging systems and even core version control systems. 🀫

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    Removing circular issue references.

  • πŸ‡ΊπŸ‡ΈUnited States xjm

    And, if I'm reading the issue right and the scope was reduced, does that mean this was reduced to the project name only, and not supporting the version number problem?

    https://packagist.org/packages/drupal-composer/info-rewrite seems to support only Composer 1 and 2.

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

    ✨ Add tracking for when recipes from Drupal.org are applied Active might have this implemented in ComposerHelper::getPackageName(), not hooked up to update module yet.

Production build 0.71.5 2024