From 5ad18426ec032ab81ab18c9f47b77ce45ca38fc9 Mon Sep 17 00:00:00 2001 From: Simon Schmidt Date: Wed, 4 Aug 2021 16:13:33 +0200 Subject: [PATCH 1/3] allow composer/installers also in version 2.x The dependecy composer/installers has update his supported types. Can we please also allow version 2.x? --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3837d0f..1ceccfb 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "require": { "php": ">=7.1", "composer-plugin-api": "^1.1 || ^2.0", - "composer/installers": "^1.0" + "composer/installers": "^1.0 || ^2.0" }, "require-dev": { "composer/composer": "^2.0", From 1c7f1475f1f6ab416a7b43f990dfb4c38db28463 Mon Sep 17 00:00:00 2001 From: Brian Hogue Date: Wed, 17 Nov 2021 15:27:48 -0500 Subject: [PATCH 2/3] Update documentation (#35) --- README.md | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 05ca2d3..360691c 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ automatically required as well if not already required. To support additional package types, add an array of these types in the `extra` property in your `composer.json`: +with [`composer/installers`][] < v1.0.13: ```json { "extra": { @@ -42,10 +43,17 @@ To support additional package types, add an array of these types in the } } ``` +with [`composer/installers`][] >= v1.0.13: +```json +{ + "extra": { + "installer-types": ["drupal-library"] + } +} +``` +Then refer to that type when adding to `installer-paths`: -Then, you can add mappings for packages of these types in the same way that you -would add package types that are supported by [`composer/installers`][]: - +with [`composer/installers`][] < v1.0.13: ```json { "extra": { @@ -57,6 +65,18 @@ would add package types that are supported by [`composer/installers`][]: } } ``` +with [`composer/installers`][] >= v1.0.13: +```json +{ + "extra": { + "installer-types": ["drupal-library"], + "installer-paths": { + "special/package/": ["my/package"], + "path/to/libraries/{$name}/": ["type:drupal-library"] + } + } +} +``` By default, packages that do not specify a `type` will be considered the type `library`. Adding support for this type allows any of these packages to be @@ -66,9 +86,9 @@ If a type has been added to `installer-types`, the plugin will attempt to find an explicit installer path in the mapping. If there is no match either by name or by type, the default installer path for all packages will be used instead. -Please see the README for [`composer/installers`][] to see the supported syntax +**Please see the README for [`composer/installers`][] to see the supported syntax for package and type matching as well as the supported replacement tokens in -the path (e.g. `{$name}`). +the path (e.g. `{$name}`).** ## License From cbf4b6f9a24153b785d09eee755b995ba87bd5f9 Mon Sep 17 00:00:00 2001 From: Ben Hamelin Date: Wed, 15 Dec 2021 07:32:42 -0500 Subject: [PATCH 3/3] Update changelog for 2.0.1 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fb7ad6..a90076c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,10 @@ The format is based on [Keep a Changelog][] and this project adheres to the ### Security +## [2.0.1] - 2021-12-15 +### Changed +- Add support for composer/installers 2.x + ## [2.0.0] - 2020-08-11 ### Added - Add `.editorconfig`, `.gitignore`, `.lando.yml`, `phpcs.xml` and `phpunit.xml`