composer/installers

A multi-framework Composer plugin that installs packages to framework-specific paths

Tool
Composer
vv2.3.0
1,441stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
58/100Fair
Development Activity32
Maintenance24
Community88
Maturity60
Momentum28

Technical Analysis

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

composer/installers is a Composer plugin that lets PHP package authors have their packages installed to a framework-appropriate directory instead of the default vendor folder. By declaring a package type such as drupal-module, wordpress-plugin, or laravel-library, authors get their code placed where the target framework expects it, with no custom installer code required.

It ships as a simple type-to-path map covering dozens of PHP frameworks and CMSes, and supports user-side customization of install paths and package names, making it the long-standing standard for framework-aware package placement in the Composer ecosystem.

What You Get

  • A prebuilt type-to-path map covering dozens of PHP frameworks and CMSes
  • Framework-aware installation without writing a custom Composer installer
  • User-configurable install paths via extra.installer-paths
  • Package-name customization on install via extra.installer-name
  • A stable, widely-adopted convention recognized across the PHP ecosystem

Common Use Cases

  • Publishing a CMS module or plugin that must install outside vendor/
  • Placing WordPress or Drupal extensions into their expected content directories
  • Overriding install paths for specific packages in an application’s composer.json
  • Distributing framework themes or components to their framework-native locations

Under The Hood

Architecture — The library is a Composer plugin (type composer-plugin) whose entry point registers an installer implementing Composer’s PluginInterface and installer contract. Under src/Composer it holds a base Installer plus a large family of per-framework Installer classes (one per supported framework/CMS), each declaring the path templates for that framework’s package types; a bootstrap.php wires autoloading. At install time Composer delegates packages of a supported type to the matching installer, which resolves the destination path from the type map and any user-supplied installer-paths overrides. Tech Stack — Pure PHP with no runtime dependencies beyond composer-plugin-api and composer/composer itself; quality tooling includes PHPUnit (phpunit.xml.dist) and PHPStan (phpstan.neon.dist with a baseline) run under GitHub Actions CI. Code Quality — The tests/Composer suite mirrors the src structure with per-installer test coverage, static analysis is enforced via PHPStan with a tracked baseline, and the codebase is small, focused, and mature after a decade of maintenance. API Design — There is essentially no code-level API for consumers; the entire interface is declarative composer.json configuration — a package type plus optional extra.installer-paths and extra.installer-name keys — which keeps adoption trivial, though the project itself notes that modern Composer 2.1+ often makes custom install paths unnecessary.

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