When cleanup goes to remove files it currently throws an exception if the file is gone... also when updating, we're just overriding files regardless of changes. I'm proposing to add an integrity-level option which will be medium by default and which people can set to low, medium, or high:
low integrity:
Update will blast files without caring about their contents
Cleanup will throw no exceptions and just remove the map entry if file is missing
medium:
Update will check if the file contents match that of the original vendor file on the original package (I think this is possible). If the file contents match, it will overwrite the file with the new version, i.e. (you have not changed from the orginal package). If they don't match, it will produce a diffable conflict.
Cleanup will print warnings that the files are missing and remove them from the map.
high:
Update will produce a diff on every conflict
Cleanup will throw exceptions as it does now if the file is missing, this will give you the ability to manually "restore" these files.
As part of this, We should look into using the file utils provided by composer which I believe are transactional -- i.e. all operations are queued so checks are done first and operations don't actually perform until after, perhaps with rollback (it's not clear). If this isn't how they operate, we should do our own quick queue option to do things this way.
I should note that I have all the code for this done (in case someone else was thinking of doing it), I just haven't had time to commit to dev branches and test yet.
When cleanup goes to remove files it currently throws an exception if the file is gone... also when updating, we're just overriding files regardless of changes. I'm proposing to add an integrity-level option which will be medium by default and which people can set to low, medium, or high:
low integrity:
medium:
high:
As part of this, We should look into using the file utils provided by composer which I believe are transactional -- i.e. all operations are queued so checks are done first and operations don't actually perform until after, perhaps with rollback (it's not clear). If this isn't how they operate, we should do our own quick queue option to do things this way.