civicrm/composer-compile-plugin
Composer plugin that adds a lightweight compile step for CiviCRM extensions and other PHP packages. Declare compile tasks in composer.json and it runs them after install or update, skipping unchanged packages via caching. A composer compile command allows manual rebuilds.
composer install becomes the single setup command for downstream users.Adopt when most of the following hold:
npm.allow-plugins allowlist, pinned versions, and a documented opt-out for environments that forbid install-time scripts.Look elsewhere when:
To executives: This is plumbing that makes our PHP packages self-installing. The bet is reduced onboarding friction and support load — downstream users run one command instead of installing and running a separate JavaScript toolchain. Cost is low (MIT-licensed, integration work is days not quarters) and the main risk is dependency on a small upstream project, which we can contain by treating it as optional and retaining the prebuilt-artifact fallback.
To engineering: It lets a package declare its compilation steps in composer.json, so the installer runs them — no bespoke per-package CI logic, no "see README for build steps." Trade-offs are explicit: install-time code execution (we must manage allow-plugins, pin versions, and provide an env-var escape hatch), longer installs, and a second build path alongside our existing asset pipeline. Recommend a time-boxed pilot on one extracted package, with success measured by onboarding steps removed and a drop in build-related support tickets, before wider rollout — and a documented decision point to drop it if upstream maintenance stalls.
How can I help you explore Laravel packages today?