composer-patches 0.2.1

Native reimplementation of cweagans/composer-patches: resolve, download, and apply patch files to installed packages during install — no PHP plugin execution. FS/PHP-agnostic core; patches applied in-process via the flickzeug fuzzy-matching diff library, never by shelling out to git/patch.
Documentation

composer-patches

Native Rust reimplementation of cweagans/composer-patches: resolve, download, and apply patch files to installed packages during a Composer install — without running the PHP plugin or shelling out to git/patch.

Part of composer-client.

What it does

  • Parses patches/*.patch (unified/git diffs, multi-file aware) via the flickzeug fuzzy-matching diff library.
  • Owns -p strip inference, file routing, and atomic on-disk application.
  • Records a re-application invariant (patches.lock.json) with content fingerprints so a patched tree is detected and not double-applied.
  • Generates diffs (the inverse) for a "create patch" flow via similar.

The core is filesystem/PHP-agnostic: it parses, plans, and applies; the host decides when.

License

EUPL-1.2.