Problem/Motivation

In the root composer.json file for drupal/drupal, there is a copy of the installer paths configuration for composer/installers:

        "installer-paths": {
            "core": ["type:drupal-core"],
            "modules/contrib/{$name}": ["type:drupal-module"],
            "profiles/contrib/{$name}": ["type:drupal-profile"],
            "themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/contrib/{$name}": ["type:drupal-drush"],
            "modules/custom/{$name}": ["type:drupal-custom-module"],
            "themes/custom/{$name}": ["type:drupal-custom-theme"]
        }

In contrast, the composer installer paths in composer/Template/LegacyProject/composer.json look like this:

        "installer-paths": {
            "core": ["type:drupal-core"],
            "libraries/{$name}": ["type:drupal-library"],
            "modules/contrib/{$name}": ["type:drupal-module"],
            "profiles/contrib/{$name}": ["type:drupal-profile"],
            "themes/contrib/{$name}": ["type:drupal-theme"],
            "drush/Commands/contrib/{$name}": ["type:drupal-drush"]
        }

The differences are:

  • drupal/drupal is missing 'libraries', and has the old (early Drush 8) location for Drush extensions.
  • drupal/legacy-project is missing the 'custom' paths, and has the correct location for Drush extensions.

n.b. Early versions of Drush 8 expected Drush extensions to be installed to drush/contrib; Drush 9, on the other hand, need Drush extensions to be in drush/Commands/contrib. Recent versions of Drush 8 (Drush 8.2.2+, March 2019) also accept the Drush 9 location.

Proposed resolution

  • Update drush/drush to use the same path for Drush extensions as the template projects are using.
  • Add libraries to drush/drush.
  • Add custom paths to the template projects.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

The composer installer paths in drupal/drupal were unified with those in the template projects, drush/recommended-project and drush/legacy-project.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greg.1.anderson created an issue. See original summary.

greg.1.anderson’s picture

Status: Active » Needs review
FileSize
2.72 KB

Here's a patch.

Mixologic’s picture

Status: Needs review » Reviewed & tested by the community

Nice cleanup, and sensible consistency.

+1

greg.1.anderson’s picture

Issue summary: View changes

Updated issue summary to remove "change record" from remaining tasks. The specific installer paths in the new Composer template projects are not documented in their existing change record, and no one should use the drupal/drupal installer paths directly, most of the time, so we probably don't need a change record here.

larowlan’s picture

Status: Reviewed & tested by the community » Fixed

Committed 8d029c4 and pushed to 8.8.x. Thanks!

  • larowlan committed 8d029c4 on 8.8.x
    Issue #3084298 by greg.1.anderson: Make composer installer paths...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.