Feels like a bug to ship 8.3.0 with explicit installer configuration for contrib but not for private repo custom modules and themes, now that we recently have locked composer/installers on 1.2.0 instead of 1.0.21. (Custom modules and themes paths requires composer/installers package v1.0.24 and up.)

I think we'd best change the config and version requirement before 8.3.0, because upping the version requirement in a patch release could change install location from vendor dir to custom dir, even if I find it rather hard to believe that drupal/drupal users would actually have installed their custom Drupal modules and themes in the vendor dir.

We'll also be able to clean-up the installer paths config (comparison) docs in https://www.drupal.org/docs/develop/using-composer/using-composer-to-man....

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Eric_A created an issue. See original summary.

Eric_A’s picture

Title: Add composer installer-paths for drupal-drupal-custom-* before 8.3.0 » Add composer installer-paths for types drupal-custom-* before 8.3.0
Eric_A’s picture

Title: Add composer installer-paths for types drupal-custom-* before 8.3.0 » Add composer installer-paths for drupal-custom-modules/themes before 8.3.0
Issue summary: View changes
Status: Active » Needs review
FileSize
1.32 KB
Eric_A’s picture

Issue summary: View changes

Status: Needs review » Needs work

The last submitted patch, 3: 2866109-3.patch, failed testing.

alexpott’s picture

This will need a different patch for 8.4.x

The change makes sense to me.

Eric_A’s picture

Status: Needs work » Needs review
FileSize
1.32 KB

Ah, thanks. Here's the patch for 8.4.x

Eric_A’s picture

DrIPA’s picture

Status: Needs review » Reviewed & tested by the community

Works for me

alexpott’s picture

Category: Bug report » Task
Status: Reviewed & tested by the community » Patch (to be ported)
Issue tags: +Needs release manager review

Committed 13360cf and pushed to 8.4.x. Thanks!

I'm not sure the release managers will want to make this change to 8.3.x. This file is really just an example and for projects using composer they are supposed to edit it. That said it is truly helpful to know how to configured this. Personally I'm +1 but not my call.

Setting to patch to be ported and 8.3.x for a choice. @Eric_A if you want to re-upload the 8.3.x patch that'd be great - it is alway helpful when the last patch on the rtbc issue is the correct patch to commit next.

  • alexpott committed 13360cf on 8.4.x
    Issue #2866109 by Eric_A: Add composer installer-paths for drupal-custom...
alexpott’s picture

Status: Patch (to be ported) » Fixed

Discussed with @catch and @cilefen. @catch was ambivalent and @cilefen was +1. Let's put this in to 8.3.x - I think this only helps people.

Committed 1a349c1 and pushed to 8.3.x. Thanks!

  • alexpott committed 1a349c1 on 8.3.x
    Issue #2866109 by Eric_A: Add composer installer-paths for drupal-custom...
Eric_A’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
1.32 KB

Ha, I just did a failed attempt to re-upload and change status. Thanks a bunch everyone!

I do believe there's real value in having the requirement at ^1.0.24, which is the one that added support for drupal-custom-module and drupal-custom-theme, and in hinting people at the possiblity of turning custom modules into private packages.

I'll see if I can update the docs later today.

Eric_A’s picture

Status: Reviewed & tested by the community » Fixed

Shoot, didn't mean to still upload it.

Eric_A’s picture

Updated docs regarding repository config and installer paths config text and comparison table.

https://www.drupal.org/node/2718229/revisions/view/10401772/10423097
https://www.drupal.org/docs/develop/using-composer/using-composer-to-man...

alexpott’s picture

Issue tags: +8.3.0 release notes

We should add something about this to the release notes because people can update there root composer.json to benefit from this.

Perhaps something like this:

We've updated composer/installers to 1.2.0. This adds support for installing custom modules and themes to directories other than /vendor. See https://www.drupal.org/node/2866988.

alexpott’s picture

Title: Add composer installer-paths for drupal-custom-modules/themes before 8.3.0 » Composer/installers update to 1.2.0 adding support for installing custom modules and themes to directories other than /vendor
Eric_A’s picture

Issue summary: View changes

You beat me to it. Thanks, @alexpott!

Status: Fixed » Closed (fixed)

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

xjm’s picture