composer / composer/installers
Installer path ignored for dev versions?
- Dominant language
- PHP
- Stars
- 1.4k
- Forks
- 400
- PR merge metrics
- No merged PRs in 30d
Description
I'm pulling in two WordPress plugins via Composer - one with a tag constraint, one from a `dev-trunk` branch. The latter is being installed to the (custom) vendor directory, instead of the location set out in the installer-paths value.
When I run `composer install -vvv` or `composer update -vvv` with the following:
```json
"require": {
"php": ">=8.3",
"composer/installers": "^2",
"buddypress/buddypress": "^14.3",
"bbpress/bbpress": "dev-trunk"
},
"config": {
"vendor-dir": "./client-mu-plugins/vendor",
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"composer/installers": true
}
},
"extra": {
"installer-paths": {
"plugins/buddypress": ["buddypress/buddypress"],
"plugins/bbpress": ["bbpress/bbpress"]
}
},
```
I get the following:
> Installs: bbpress/bbpress:dev-trunk 4d538c1, buddypress/buddypress:14.3.4
> Reading /Users/gary/Library/Caches/composer/files/bbpress/bbpress/7d8c15849c0a17a5ab44178c1447653b4ebef6f8.zip from cache
> - Loading bbpress/bbpress (dev-trunk 4d538c1) from cache
> Executing command (CWD): 'svn' '--version'
> - Installing bbpress/bbpress (dev-trunk 4d538c1): Extracting archive
> Executing async command (CWD): '/usr/bin/unzip' '-qq' '/Users/gary/code/community-wpvip/./client-mu-plugins/vendor/composer/tmp-bc9606b1daa412ace2fe9e34f17f5932.zip' '-d' '/Users/gary/code/community-wpvip/./client-mu-plugins/vendor/composer/8fd4c4a6'
> - Marking bbpress/bbpress (9999999-dev 4d538c1) as installed, alias of bbpress/bbpress (dev-trunk 4d538c1)
> - Installing buddypress/buddypress (14.3.4): Checking out /tags/14.3.4/@3259478
Executing command (CWD): 'svn' 'co' '--non-interactive' '--' 'https://plugins.svn.wordpress.org/buddypress//tags/14.3.4/@3259478' '/Users/gary/code/community-wpvip/plugins/buddypress'
Summary: BuddyPress 14.3.4 correctly installs into `plugins/buddypress` via checking out the tag, but bbPress trunk installs to a customer vendor directory by extracting from a zip. I'd like the zip extracted into the correct `plugins/bbpress` directory as well.
$ composer --version
Composer version 2.8.7 2025-04-03 16:26:28
PHP version 8.3.16 (/opt/homebrew/Cellar/php@8.3/8.3.16/bin/php)
Side context: https://bbpress.trac.wordpress.org/ticket/3630 explains how the `composer.json` file isn't in the tagged code, which is why I'm having to use `dev-` branch in the first place.
Contributor guide
Assessment
This issue has not been assessed yet.