ksenzee/patch-patcher

There is no license information available for the latest version (v1.0.0) of this package.

A plugin for composer-patches that allows using the patch binary in place of git apply

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

Type:composer-plugin

pkg:composer/ksenzee/patch-patcher

v1.0.0 2025-10-08 15:18 UTC

This package is not auto-updated.

Last update: 2025-12-04 21:30:13 UTC


README

An addon for the composer-patches plugin that makes it possible to apply patches using the patch binary, rather than git apply. Note that this project does nothing to ensure that patch works correctly on the system where you're using it, or that the patch you're trying to apply will actually apply. It simply adds patch to the list of patchers available to composer-patches. You are responsible for ensuring that patch can, in fact, apply the patch you need.

This project is only useful in cases where git apply does not properly apply a patch, but patch does apply it, and you are for some reason not able to substitute a patch that does apply correctly. It is fairly common for a patch not to apply perfectly because, for example, a line of code has been added, so the patch is written to apply to line 50, but actually apples to line 51. The patch binary includes logic to handle this situation; it will output a message such as "Hunk #1 succeeded at 51 with fuzz 1." The recommended course of action in this situation is to use patch to apply your patch, then use the git diff tool to create a patch that is compatible with git apply. This tool should only be used if for some reason you cannot produce a patch that git apply is able to handle.

patch-patcher has been tested on multiple flavors of Linux, but not on other systems; merge requests to make it more cross-platform are welcome.