CodeIgniter Forums
Automatic Project Updating - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Addins (
+--- 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...

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?
If you updated with Patches these would be handled for you!

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

2. Use the CLI command to update:
> 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:


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
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:

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.