Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #2
drummI 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.
Comment #3
drummThis is a duplicate of #2820230: Display Composer require strings on project release table, but we need an issue for release pages.
Comment #4
drummComment #7
drummComment #9
drummThis has been deployed.