solidbunch / composer-installers
Custom installer for StarterKit package types
Package info
github.com/solidbunch/composer-installers
Type:composer-plugin
pkg:composer/solidbunch/composer-installers
1.1.1
2026-09-21 19:15 UTC
Requires
- php: >=8.1
- composer-plugin-api: ^2.0
Requires (Dev)
- composer/composer: ^2.0
- phpunit/phpunit: ^10.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Website | Documentation
Overview
Custom Composer installers for StarterKit projects by SolidBunch.
Supports custom types:
kit-module— for reusable modules located inkit-modules/wordpress-core— for downloading core WordPress files
Installation
In your project composer.json:
"require": { "solidbunch/composer-installers": "^1.1" }, "config": { "allow-plugins": { "solidbunch/composer-installers": true } }, "extra": { "installer-paths": { "kit-modules/{$name}/": ["type:kit-module"], "web/wp-core/": ["type:wordpress-core"] } }
Composer 2.2+ only runs plugins listed in allow-plugins, so the config block above is required.
Behavior
- If
installer-pathsare defined — packages will be installed accordingly. - If not — packages will default to
vendor/. {$vendor}and{$name}in an install path are replaced with the package's vendor and name, e.g.kit-modules/{$vendor}/{$name}/.- The installer claims a supported package type only when
extra.installer-pathshas a rule that can match it: atype:rule naming that exact type, or any rule that is not atype:rule. Otherwise another installer (or Composer's default) handles the package. - A package-name rule makes the installer claim the whole type, because a name cannot be checked when the type is claimed. Another installer for that type is then not consulted, and packages of that type without a matching rule go to
vendor/. - Rules naming an exact package (
"vendor/name") are checked beforetype:rules; inside each group the first rule ininstaller-pathsorder wins. - Package-name rules only apply to packages of the supported types
kit-moduleandwordpress-core; a package of any other type is never handled by this installer. - A trailing slash in an
installer-pathskey is accepted and stripped from the resulting install path, because Composer's installer contract forbids a trailing slash. - The
vendor:prefix known fromcomposer/installersis not supported. type:*is not a wildcard; atype:rule must name the exact type.
Stay Connected
- Participate on GitHub Discussions
- Connect via LinkedIn