netresearch/composer-patches-plugin
Composer plugin that automatically applies patches to your dependencies after install and update. Define local or remote diff files in composer.json to keep third-party packages fixed without forking. Helps make dependency patching reproducible and easy to manage across environments.
vendor/ that no one can reproduce.Consider it when most of the following hold:
Look elsewhere — or solve it differently — when:
cweagans/composer-patches is the widely adopted option with far more deployment history; at ~80 stars and an unreported repository, this package's adoption and bus-factor signals are thin. Prefer the incumbent unless you have a specific reason — and if you can't state that reason, that's the answer.Practical note: whatever you pick, require the patch set to be small, documented with an upstream issue link, and reverted the moment a real release lands. A patch with no ticket is a bug you scheduled for later.
For executives: This is a small, low-cost piece of build tooling that removes a common cause of schedule slip — waiting on a third party to fix a bug we didn't cause. It lets us keep a release date and carry a narrowly scoped, tracked fix instead of delaying the roadmap or paying for a full fork. The trade is modest and bounded: we take on ownership of a few lines until the upstream release lands, and we must track and retire them. Cost is engineer time, not license or infrastructure spend. Two caveats worth your awareness: the license is AGPL-3.0, which is acceptable for build-time tooling but should get a quick legal confirmation, and the project is small and lightly adopted, so we pin the version and keep an exit path. Recommendation: approve for a trial on one release, with a hard requirement that every patch is documented and tied to an upstream ticket.
For engineering: This gives you a declarative, repeatable way to apply patches to Composer dependencies during install — no more hand-editing vendor/, no more "it works on my machine." Patches live in the repo, are reviewed like code, and apply identically in CI and local dev. That means reproducible builds, an auditable record of every divergence from upstream, and a clean removal path once a fixed release ships. Non-negotiables if we adopt: one patch directory with a README mapping each patch to its upstream issue, a reviewer on every patch, a check on dependency upgrades that fails loudly when a patch no longer applies, and a pinned plugin version. Before committing, benchmark it head-to-head against cweagans/composer-patches — we should be able to articulate why we'd take the less-adopted tool, and "the incumbent didn't work for us" is the only good answer. Also note the license is AGPL-3.0: it stays out of runtime dependencies and out of anything we distribute, so it's confined to the build chain, but treat that as a constraint to keep, not a detail to forget.
How can I help you explore Laravel packages today?