Simplify composer.json
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3480859. --> Reported by: [mparker17](https://www.drupal.org/user/536298) Related to !10 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Since we recently updated <a href="https://www.drupal.org/docs/contributed-modules/project-browser/module-maintainers-how-to-update-projects-to-be-compatible-with-project-browser#s-short-description">the d.o-Project-node's summary field for the project browser initiative</a>, we should update the <code>description</code> field in <code>composer.json</code> too.</p> <p>For the sake of maintaining fewer lines of code, we can also remove some fields from <code>composer.json</code>, because <a href="https://www.drupal.org/project/project_composer">the Drupal.org Composer Service (fa&ccedil;ade) a.k.a. project_composer</a> rewrites the following fields which are currently defined in <code>ckeditor_abbreviation</code>'s <code>composer.json</code>...</p> <ol> <li><code>type</code>: it will be set to <code>drupal-module</code> because the d.o-Project-node type is <code>project_module</code></li> <li><code>keywords</code>: it will be set to match the <a href="https://www.drupal.org/docs/contributed-modules/project-browser/module-maintainers-how-to-update-projects-to-be-compatible-with-project-browser#s-categories">d.o-Project-node categories</a></li> <li><code>license</code>: it will be set to <code>GPL-2.0-or-later</code>, because all projects hosted on d.o must have this license</li> <li><code>homepage</code>: it will be set to the d.o-Project-node URL</li> <li><code>support/source</code>: it will be set to the URL of the project on git.drupalcode.org</li> <li><code>require</code>: it will be set to match the <code>dependencies</code> in the <code>.info.yml</code> file because all current dependencies are Drupal projects</li> </ol> <p>For more information, see the following project_composer code: <a href="https://git.drupalcode.org/project/project_composer/-/blob/7.x-1.x/project_composer.module?ref_type=heads#L750-772"><code>_project_composer_build_component_metadata()</code></a>, <a href="https://git.drupalcode.org/project/project_composer/-/blob/7.x-1.x/project_composer.module?ref_type=heads#L442-481"><code>project_composer_get_component_json()</code></a>, and <a href="https://git.drupalcode.org/project/project_composer/-/blob/7.x-1.x/project_composer.module?ref_type=heads#L585-609"><code>_project_composer_release_metadata()</code></a>.</p> <p>Note that project_composer also rewrites the <code>name</code>, but it is one of the few <em>required</em> fields in <code>composer.json</code>, so if someone happens to clone the module, it is nice to have it set, so that Composer doesn't get upset.</p> <p>Note that project_composer does not automatically insert a <code>support/source</code> key; we can leave this as-is.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <ol> <li>Update the <code>description</code> field in <code>composer.json</code></li> <li>Remove the <code>type</code>, <code>keywords</code>, <code>license</code>, <code>homepage</code>, <code>support/source</code>, and <code>require</code> fields in <code>composer.json</code></li> </ol> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <ol> <li><del>Write a patch</del></li> <li>Review and feedback</li> <li>RTBC and feedback</li> <li>Commit</li> </ol> <h3 id="summary-ui-changes">User interface changes</h3> <p>None.</p> <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