Create a composer.json

Created on 30 September 2024, 3 months ago

Problem/Motivation

This module does not currently have a composer.json file.

Technically, one is not required, as the Drupal.org Composer Service (façade) a.k.a. project_composer will add one. But, since the author of this issue (@mparker17, a maintainer of this module) also maintains a whole bunch of other projects, and a composer.json file is required to use DDEV's ddev/ddev-drupal-contrib add-on (which makes working on issues much easier), @mparker17 wants to add one, to reduce maintenance overhead.

Proposed resolution

Add a composer.json file with at least the following information...

  1. name: technically, project_composer overwrites this, but it's one of the few required fields in composer.json, so if someone happens to clone the module, it is nice to have it set, so that Composer doesn't get upset
  2. description: set to match the d.o-Project-node's summary field ( which was recently updated for the Project Browser initiative )

Notably, this composer.json should omit the following fields, because project_composer will overwrite them...

  1. require: it will be set to match the dependencies in the .info.yml file
  2. require-dev: it will be set to match the test_dependencies in the .info.yml file
  3. keywords: it will be set to match the d.o-Project-node categories
  4. homepage: it will be set to the d.o-Project-node URL
  5. version: it will match the d.o-Release-node version that project_browser is bundling for
  6. license: it will be set to GPL-2.0-or-later, because all projects hosted on d.o must have this license
  7. authors: it will be set to the Project's maintainers
  8. support/source: it will be set to the URL of the project on git.drupalcode.org
  9. type: it will be set to drupal-module because the d.o-Project-node type is project_module

... for more information, see the following project_browser code: _project_composer_build_component_metadata(), project_composer_get_component_json(), and _project_composer_release_metadata().

The suggest, and extra fields might be useful in the future, but we don't need them for this ticket.

Remaining tasks

  1. Write a patch
  2. Review and feedback
  3. RTBC and feedback
  4. Commit

User interface changes

None.

API changes

None.

Data model changes

None.

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇦Canada mparker17 UTC-4

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

Comments & Activities

Production build 0.71.5 2024