koodimonni/composer-dropin-installer
Composer plugin for Drupal that installs contributed modules, themes, and libraries into the correct project directories as drop-in packages. It simplifies dependency management for Drupal sites by letting Composer fetch and place code where Drupal expects it, reducing manual downloads and keeping b...
Architecture fit. koodimonni/composer-dropin-installer is a Composer installer plugin, not an application library. It hooks Composer's install/update lifecycle and, for packages that declare a dropin-paths map in their own extra block, copies selected files into project-relative paths only when the destination does not already exist. Architecturally this is a narrow, well-understood seam: it changes where vendor artifacts land and changes the overwrite policy from "replace" to "write-once." That fits a specific shape of project — a PHP application (typically WordPress/Bedrock-style) that needs vendor-supplied drop-ins (object-cache.php, advanced-cache.php, mu-plugins, custom config stubs) placed in the web root without stomping on site-owner customizations. It does not fit general dependency management, and it is not a substitute for composer/installers unless the write-once semantics are the actual requirement.
Integration feasibility. Mechanically easy: add the plugin, composer install, done. The friction is almost entirely in (a) version compatibility and (b) governance. On compatibility, the plugin was written against the Composer 1 plugin API (composer-plugin-api ^1.0), and Composer 2 changed the PluginInterface surface and, from 2.2, gates all plugins behind an explicit allow-plugins allowlist. Expect it to require a fork or a maintained drop-in replacement unless the upstream has been updated; this is the single largest feasibility unknown and should be validated before any commitment. On governance, the WTFPL license is permissive but is a non-standard, legally ambiguous text that many enterprise OSS review boards will reject or flag; that is a procurement problem, not a technical one, and it needs to be resolved early because it determines whether a fork is even an option.
Technical risk. Ranked:
composer install and must be governed by the allow-plugins allowlist plus review of package extra blocks.Key questions to resolve before design freeze.
composer/installers + installer-paths) or "preserve local overrides" (solvable with a deploy-time template step)?Stack fit. Good fit when all of the following hold: PHP monolith with Composer-managed vendors; WordPress or WordPress-like layout with a committed web root; a small, stable set of drop-in artifacts; and a team willing to own a plugin fork. Poor fit for polyglot build systems, container images built from a lockfile where the web root is ephemeral (write-once semantics are meaningless if the filesystem is rebuilt every deploy), or any environment where two packages could target the same path. In a container-first stack, the correct integration is often "let the file be overwritten in the image, apply site overrides at deploy," which sidesteps this plugin entirely.
Migration path. Treat it as an adoption, not a refactor:
composer-plugin-api plus the PluginInterface method signatures.Compatibility. Three axes to verify per environment: Composer major version and plugin API constraint; allow-plugins entries in composer.json (required from Composer 2.2 onward, and a hard blocker in CI if omitted); and PHP version against the plugin's own constraints. Also confirm behavior on composer install --no-dev, on composer update, and inside CI caches that restore vendor/ without re-running installers — a restored vendor/ can present as "installed" with the install hook never having fired.
Sequencing. Compatibility validation → fork and publish → allowlist and policy sign-off → pilot repo → shared template/base composer.json → fleet rollout. Keep the fork and the pin in the same PR series so the org never runs upstream and fork in parallel.
Maintenance. Budget for steady-state ownership, not just adoption. Realistic recurring work: tracking Composer plugin-API changes (which have broken plugins before and will again), PHP minor-version compatibility, and rebasing the fork if upstream ever moves. Even if the fork is a three-line signature change today, it is a permanently held package with no upstream to defer to. Assign a named owner and a review cadence; an unowned fork is worse than an unmaintained dependency because it looks supported.
Support. There is no meaningful community to escalate to — small star count, no dependents, no visible maintainer responsiveness. Internal L1/L2 runbooks must cover: drop-in missing, drop-in stale, drop-in installed to the wrong path, and "Composer says success but the file isn't there." Document the exact glob/path expansion for each package so support can trace a target path without reading installer source.
Scaling. Throughput is a non-issue: operations are local filesystem copies of a handful of files per install, with negligible time and no network calls. Scaling concerns are organizational rather than computational — the number of packages declaring dropin-paths and the number of environments where those paths must stay consistent. Growth in either dimension increases the chance of two packages targeting the same destination, which the plugin will resolve by "first write wins" rather than by conflict error. Cap and review the set of packages permitted to use this installer.
Failure modes.
vendor/ restored from cache skips the installer entirely. Mitigation: key caches on composer.lock and force a cold install on release builds.extra resolve relative to the Composer working directory; running Composer from a subdirectory can place files unexpectedly. Mitigation: enforce a single canonical install root.allow-plugins entry causes a hard failure on Composer 2.2+, or an interactive prompt that hangs unattended CI. Mitigation: commit the allowlist and run non-interactive in CI.Ramp-up. Low individual learning curve for a PHP developer — an hour to understand the installer type, extra schema, and write-once behavior. The real ramp-up is organizational: teaching the team that "installed" does not mean "current," and that a green Composer run is not evidence the drop-in is in place. Plan for a short internal write-up, a shared post-install verification script, and one brown-bag session before the second team adopts it.
How can I help you explore Laravel packages today?