Composer Custom Directory Installer

A Composer plugin that installs packages into custom directories outside the vendor folder.

Tool
Composer
v2.2.1
143stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
43/100Fair
Development Activity16
Maintenance20
Community64
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture78
Code Quality80
Innovation70
Learning Curve82

Composer Custom Directory Installer is a Composer plugin that lets you install packages into custom directories outside the default vendor folder. Unlike installers that add new non-Composer package types, it works with standard library-type packages and can be extended to any Composer package type through your root composer.json.

Install paths are configured declaratively in the extra section, with support for path variables (such as vendor and package name), variable flags, and layered matching strategies covering exact package names, package-type prefixes, and wildcard vendor globs. This makes it useful for monorepos, WordPress/Drupal layouts, and any project that needs dependencies placed at specific filesystem locations.

What You Get

  • Custom install paths for Composer packages outside the vendor directory
  • Path variables like vendor and package name for building target directories
  • Layered matching: exact package name, package-type prefix, and wildcard vendor globs
  • Extension to arbitrary Composer package types via extra.installer-types
  • A configurable installer-name for finer control over placement

Common Use Cases

  • Placing WordPress plugins or Drupal modules in framework-specific directories
  • Organizing monorepo dependencies into custom paths outside vendor
  • Installing specific packages to non-standard locations required by tooling

Under The Hood

Architecture - Under src/Composer, the package implements Composer’s PluginInterface and provides a custom Installer that overrides getInstallPath(). During installation Composer consults the plugin, which reads extra.installer-paths (and installer-types) from the root manifest and resolves the target directory by applying path variables and evaluating matching strategies in precedence order: exact package name, package-type prefix, then wildcard vendor glob.

Tech Stack - Pure PHP built against composer-plugin-api and composer/installers conventions. The repo includes a Dockerfile and Makefile for a reproducible development and test environment.

Code Quality - The project ships a PHPUnit suite (phpunit.xml with a tests directory) and consistent maintenance, appropriate for a small but widely depended-on Composer plugin (100k+ monthly installs).

API Design - There is no code API to learn; configuration is entirely declarative in composer.json, and the layered matching rules plus documented path-variable flags make intent explicit. This keeps the learning curve low for anyone already comfortable with Composer’s extra configuration.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search