Problem/Motivation

In #2372815: [meta] Make the <root>/composer.json file a working example drupal/drupal needs to be added to packagist #2373203: [no patch] Take over ownership of drupal/drupal and drupal/core on Packagist. However, packagist will not accept packages that do not have a composer.json file to read from.

Proposed resolution

Rename example.composer.json to composer.json.

It also should be noted that the distribution (i.e. Symfony Standard Edition or Laravel) is not typically updated, on the contrary, the framework (i.e. Symfony or Laravel Framework) is updated often via Composer. In the same way, drupal/drupal will not be updated by the Composer user, and drupal/core will be updated by the Composer user. Both Symfony Standard Edition and Laravel have working composer.json files in their root. This is an acceptable practice and there is minimal chance that this file (or any other file in the ditrobution for that matter) will be overridden.

Remaining tasks

  1. Write the patch after #1975220: Allow a Composer user to manage Drupal, modules, and PHP dependencies with a custom root composer.json is commited

API changes

It might seem odd to have a composer.json file rather than example.composer.json file. The former can be overridden if someone where to upgrade drupal/drupal. However, in the interest of making #2372815: [meta] Make the <root>/composer.json file a working example, composer.json becomes like .htaccess.

Comments

davidwbarratt’s picture

Status: Postponed » Closed (works as designed)