composer-patches
composer-patches copied to clipboard
Patching done on temp folder; replacement on success
Though I do know, that patching in production shouldn't be the way to go - it sometimes happens. Could this module be altered in a way, that instead of instantly deleting the packages to be patched, the package is downloaded into a "temp" directory, say by adding a suffix to the folder, the patch is applied and on a clean success the old directory is deleted and the "temp" (patched) is renamed according?
this would drastically reduce trouble in cases where
- composer takes ages to resolve dependencies (but has already deleted the code-base for it to be "re-installed and re-patched")
- composer runs into trouble and decides to die due to "reasons"
- patch applies partially and leaves behind a potential mess (think undefined but referenced classes ...)
- ... whatever other use cases there are for "safety first"
Someone certainly could do that. Just a simple matter of programming :)
In main, there is now a patches.lock file and patches are cached in the composer cache. The likelihood of this happening if you've tested your patch locally is very low.