PHPackages                             civicrm/composer-compile-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. civicrm/composer-compile-plugin

ActiveComposer-plugin[DevOps &amp; Deployment](/categories/devops)

civicrm/composer-compile-plugin
===============================

Define a 'compile' event for all packages in the dependency-graph

v0.22(6mo ago)12488.2k↓19.6%914MITPHPPHP &gt;=7.3CI passing

Since Sep 11Pushed 6mo ago17 watchersCompare

[ Source](https://github.com/civicrm/composer-compile-plugin)[ Packagist](https://packagist.org/packages/civicrm/composer-compile-plugin)[ RSS](/packages/civicrm-composer-compile-plugin/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (23)Used By (14)

Composer Compile Plugin
=======================

[](#composer-compile-plugin)

The "Compile" plugin enables developers of PHP libraries to define free-form "compilation" tasks, such as:

- Converting SCSS to CSS
- Generating PHP wrappers based on an XML schema

For site-builders who use these PHP libraries, compilation tasks run seamlessly during the regular download (`composer install`, etc).

For developers who publish PHP libraries, a task can be as simple as:

```
{
  "require": {"civicrm/composer-compile-plugin": "~0.14"},
  "extra": {
    "compile": [
      {"run": "@sh cd css; cat one.css two.css three.css > all.css"}
    ]
  }
}
```

Tasks may be defined in several ways, including:

- Shell command (`@sh cat file-{1,2,3} > big-file`)
- PHP method (`@php-method MyBuilder::build`)
- PHP eval (`@php-eval file_put_contents('big-file', make_big_file());`)
- PHP script file (`@php-script my-script.php`)
- Composer subcommand (`@composer dump-autoload`)

Features:

- Easy to enable. No manual configuration for downstream site-builders. Framework agnostic.
- Plays well with other `composer` tooling, like [forked repositories](https://matthewsetter.com/series/tooling/composer/forked-repositories/), [composer-patches](https://github.com/cweagans/composer-patches), [composer-locator](https://github.com/mindplay-dk/composer-locator), [composer-downloads](https://github.com/civicrm/composer-downloads-plugin), and the autoloader.
- Allows library repos to remain "clean" without committing build artifacts.
- Runs locally in PHP. Does not require external/hosted services or additional interpreters.
- Supports file monitoring for automatic rebuilds (`composer compile:watch`)
- Enforces permission model to address historical concerns about `composer` hooks and untrusted libraries.
- Integration-tests pass on both `composer` v1.10 and v2.0.

Documentation
-------------

[](#documentation)

- [site-build.md](doc/site-build.md): Managing the root package (for site-builders)
- [tasks.md](doc/tasks.md): Working with tasks (for library developers)
- [evaluation.md](doc/evaluation.md): Evaluate and compare against similar options
- [develop.md](doc/develop.md): How to work with `composer-compile-plugin.git` (for plugin-development)

See also
--------

[](#see-also)

- [composer-compile-lib](https://github.com/civicrm/composer-compile-lib): Small library of opinionated helpers/examples for specific compilation tasks -- meta-PHP, SCSS, etc
- [composer#1193](https://github.com/composer/composer/issues/1193): Old discussion thread about post-install hooks for dependencies

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance66

Regular maintenance activity

Popularity46

Moderate usage in the ecosystem

Community30

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 90.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~89 days

Recently: every ~327 days

Total

22

Last Release

198d ago

PHP version history (3 changes)v0.1PHP &gt;=7.1

v0.18PHP &gt;=7.2

v0.22PHP &gt;=7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1336047?v=4)[Tim Otten](/maintainers/totten)[@totten](https://github.com/totten)

---

Top Contributors

[![totten](https://avatars.githubusercontent.com/u/1336047?v=4)](https://github.com/totten "totten (180 commits)")[![stesi561](https://avatars.githubusercontent.com/u/9410526?v=4)](https://github.com/stesi561 "stesi561 (9 commits)")[![seamuslee001](https://avatars.githubusercontent.com/u/6799125?v=4)](https://github.com/seamuslee001 "seamuslee001 (5 commits)")[![jackrabbithanna](https://avatars.githubusercontent.com/u/1508311?v=4)](https://github.com/jackrabbithanna "jackrabbithanna (2 commits)")[![colemanw](https://avatars.githubusercontent.com/u/2874912?v=4)](https://github.com/colemanw "colemanw (1 commits)")[![demeritcowboy](https://avatars.githubusercontent.com/u/2967821?v=4)](https://github.com/demeritcowboy "demeritcowboy (1 commits)")

---

Tags

buildcomposercomposer-pluginphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/civicrm-composer-compile-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/civicrm-composer-compile-plugin/health.svg)](https://phpackages.com/packages/civicrm-composer-compile-plugin)
```

###  Alternatives

[johnpbloch/wordpress-core-installer

A custom installer to handle deploying WordPress with composer

22110.8M47](/packages/johnpbloch-wordpress-core-installer)[enumag/no-thanks

Prevents symfony/flex from printing thanks reminder.

3315.6k](/packages/enumag-no-thanks)[inpsyde/vip-composer-plugin

A Composer plugin to ease deployment to wordpress.com VIP servers alongside Composer-based development.

1258.2k](/packages/inpsyde-vip-composer-plugin)[stephank/composer-plugin-nixify

Composer plugin to help with Nix packaging

1710.5k](/packages/stephank-composer-plugin-nixify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
