Problem/Motivation

When installing modules via composer, version mapping is a little esoteric: hard for new users to understand, easy for experienced users to forget unless using it on a regular basis.

Proposed resolution

On module project pages, for each version/development release, auto-generate and display the correct composer require command.

Possible solutions:

  • Plain text of full command somewhere composer require drupal/token:1.x-dev
  • OR an extra composer column (besides Version/Download/Date) in table, saying something like: drupal/token:1.x-dev To fit without wrapping, consider dropping file sizes from tar/gz downloads (if consensus is they're of limited use) or use a short link that, when clicked, uses JS to display a complete command that can be copied to the clipboard.

Remaining tasks

User interface changes

API changes

None.

Data model changes

None.

Comments

wturrell created an issue. See original summary.

drumm’s picture

Project: Drupal.org infrastructure » Drupal.org customizations
Version: » 7.x-3.x-dev
Component: Other » User interface
Related issues: +#2551607: [meta] Path forward for Composer support

I thought we might have an issue for this already, but didn’t spot one after a few minutes looking around #2551607: [meta] Path forward for Composer support and related issues.

The code to back this up will go in Drupal.org customizations.

drumm’s picture

Title: Project pages - add auto-generated composer require commands to Downloads » Project release pages - add auto-generated composer require commands to Downloads
Related issues: +#2820230: Display Composer require strings on project release table

This is a duplicate of #2820230: Display Composer require strings on project release table, but we need an issue for release pages.

drumm’s picture

Assigned: Unassigned » drumm

  • drumm committed aaa4dba on 7.x-3.x, dev
    Issue #2875731: Add CTools content type for release’s Composer install...

drumm credited Mixologic.

drumm’s picture

Status: Active » Fixed
Issue tags: +needs drupal.org deployment

  • drumm committed 465e8cb on 7.x-3.x, dev
    Issue #2875731 by drumm, Mixologic: Fix install with Composer version...
  • drumm committed cc24298 on 7.x-3.x, dev
    Issue #2875731 by drumm: Add Composer command to release pages
    
drumm’s picture

Issue tags: -needs drupal.org deployment

This has been deployed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.