CodeIgniter Forums
Automatic Project Updating - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Addins (https://forum.codeigniter.com/forum-34.html)
+--- Thread: Automatic Project Updating (/thread-76591.html)



Automatic Project Updating - MGatner - 05-29-2020

Hi all! I have a new module to share that I'm pretty excited about. Been working on this one a long time, and there will be some more features to come but I wanted to get the initial version out...

Tatter\Patches
Do you find it hard to keep all your project files consistent with the framework versions? Do you release libraries and modules that require developers to update their projects regularly? Let Patches help!
Patches is a module for updating CodeIgniter 4 projects. It will analyze your project code against the vendor releases (current and updated) and help you patch files.
Did you know that moving from version 4.0.2 to version 4.0.3 update 11 files in your project root? https://github.com/codeigniter4/framework/compare/v4.0.2...v4.0.3
If you updated with Patches these would be handled for you!

Easy to use 2-step process:
1. Install the module with Composer:
Code:
> composer require --dev tatter/patches

2. Use the CLI command to update:
Code:
> php spark selfupdate

That's it! Visit the GitHub repo for more advanced configuration options, a play-by-play example of use, and the source code:

https://github.com/tattersoftware/codeigniter4-patches
https://packagist.org/packages/tatter/patches

+++++++++++++++++++++++

As always your feedback is very welcome! Feel free to discuss here, or submit feature requests and bug reports over at Github. Thanks for reading!


RE: Automatic Project Updating - MGatner - 06-10-2021

Hi all! A quick note on Patches: I've just release version 2, which is such a big change it probably should have been its own library! To quote from my previous release notes:

Quote:`Patches` began as a concept for alleviating the very rote task of comparing framework revisions to their project equivalent. A tremendous amount of effort went into the handlers and interactive command, which amounted to the following:
1. Auto-merging updated files that were untouched in the project
2. Notifying the developer (with optional diff) about updated files that were touched and needed conflict resolution

The eventual goal was to offer an additional, more complex Merger to handle three-way merges, thus relieving some of the work hidden in point 2 above. There were a handful of abandoned attempts at this, with the final conclusion: Git already does this better.

What else does Git do great? Point number one. Basically I realized that `Patches` had become an effort at recreating some of the power of Git in a PHP backend framework, very unnecessarily. So instead of pressing further into this approach, I will be ending support for this library as a PHP module and refactoring it into a command-line script that leverages `git` and `composer` to handle the heavy lifting.
Version 2 is now launched, and I'm finding it to be a huge improvement. Check it out at https://packagist.org/packages/tatter/patches
For those who prefer the current approach: version `1.2` will remain available (including a `1.x` branch), or check out Liaison Revision from our own @paulbalandan: https://github.com/paulbalandan/liaison-revision.


RE: Automatic Project Updating - paliz - 06-10-2021

Thank you man its huge help for developer #_#


RE: Automatic Project Updating - MGatner - 06-10-2021

Welcome @paliz! I use it heavily myself, so most of the changes are based on a *lot* of personal experience using it in projects. I've already made quite a few tweaks and I'm starting to think about version 2.1 Wink


RE: Automatic Project Updating - InsiteFX - 06-11-2021

Thanks @MGatner , Great asset to the framework.