Project release pages - add auto-generated composer require commands to Downloads
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2875731. -->
Reported by: [wturrell](https://www.drupal.org/user/3503356)
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>When installing modules via composer, <a href="https://www.drupal.org/docs/develop/using-composer/using-composer-to-manage-drupal-site-dependencies#adding-modules">version mapping is a little esoteric</a>: hard for new users to understand, easy for experienced users to forget unless using it on a regular basis.</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>On module project pages, for each version/development release, auto-generate and display the correct <code>composer require</code> command.</p>
<p>Possible solutions:</p>
<ul>
<li>Plain text of full command somewhere <code>composer require drupal/token:1.x-dev</code> </li>
<li>OR an extra composer column (besides Version/Download/Date) in table, saying something like: <code>drupal/token:1.x-dev</code> 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.</li>
</ul>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<p>None.</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>None.</p>
issue