composer-patches
composer-patches copied to clipboard
Pure PHP implementation of Patch (avoid a dependency from the Operating System)
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!
@cweagans I would love to know your thoughts on this. Thanks!
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.
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.