composer-patches icon indicating copy to clipboard operation
composer-patches copied to clipboard

Pure PHP implementation of Patch (avoid a dependency from the Operating System)

Open marclaporte opened this issue 6 years ago • 2 comments
trafficstars

As a spin off https://github.com/cweagans/composer-patches/issues/93#issuecomment-312703739 , copying the comment below:

About "Research: Pure PHP implementation of patch?" -> The patch utility is not always available and thus, we'd like this to be handled by cweagans/composer-patches (directly or indirectly)

Would this work? https://github.com/FMaz008/UnifiedDiffPatcher

Are you aware of any other suitable libs? Anything already on Packagist.org?

Thanks!

marclaporte avatar Mar 21 '19 03:03 marclaporte

@cweagans I would love to know your thoughts on this. Thanks!

marclaporte avatar Aug 16 '22 16:08 marclaporte

i thought about it a bit (did you and i talk about it on IRC a few years ago?). I'm not sure this should go into composer-patches itself, but my intent is to make it possible to extend the methods by which a patch can be applied to a particular package in 2.x (which is currently vaporware). Composer has a way for plugins to extend other plugins, so it should be a relatively straightforward thing to do this.

Most people just use patch or git though.

cweagans avatar Aug 16 '22 17:08 cweagans

main supports pluggable patchers now, so this can be done outside of the main plugin. I'm also kicking around the idea of using https://justine.lol/ape.html to compile GNU patch and distribute it either with the plugin or with a separate plugin that extends this one.

cweagans avatar Feb 07 '23 20:02 cweagans