Welcome Guest, Not a member yet? Register   Sign In
Liaison Revision - Seamless software updates library for CodeIgniter4 projects.
#1

(This post was last modified: 01-31-2021, 10:27 PM by paulbalandan.)

With the release of v4.0.5 and v4.1.0, you may find yourselves in a hassle to find the latest changes from previous versions. Well, Composer, can help you with that, of course. But Composer only updates your vendor directory. You still need to manually check changes in your app, public folders as well as if there are changes to spark and env.

Enter Liaison Revision! Revision, with the help from Composer, helps you keep track of the changes of files outside the system folder. Using an intuitive terminal output, it will guide you step by step through each file changed or added. If you are feeling lazy then let Revision replace all files at once. It can even show you the diffs each identified file has.

The power of Revision comes from its ability to track the latest changes in the CI4 framework. Let's say you reported a bug fix and that got fixed right away. That fix involves the system folder as well as changes in public and app folder. With Composer your system folder will only be updated, but with Revision your public and app folders will also get updated.

Not enticed yet? Revision also comes with a backup utility. If you want to accept a change in the app folder but you also want to keep the changes you have already made, you can use the safe overwrite option. This will update your affected file to the latest copy but also keeping a backup of the old one so you can fill in the details you want. Revision's logging comes in three flavors (JSON, XML, LOG) so you can use whichever you want.

Revision requires PHP >= 7.3 and works also with PHP 8.0. This also requires the php-intl extension to work with translations. And lastly, you need the latest CI4 release, v4.0.5 or v4.1.0, to get this running.

Code:
composer require liaison/revision

Source code
Packagist
Reply
#2

This tool is awesome. Thank you for creating it!
I use it in my project template: https://github.com/kenjis/ci4-app-template

I use like this:
Code:
$ php spark revision:update

CodeIgniter v4.1.0 Command Line Tool - Server Time: 2021-02-01 00:57:50 UTC-06:00

Liaison Revision
Version: 1.0.0
Run Date: Mon, 01 February 2021, 00:57:50 UTC-06:00

Loaded configuration settings from: Liaison\Revision\Config\Revision.
+---------------------------+----------------------------------------------------------+
| Setting                   | Value                                                    |
+---------------------------+----------------------------------------------------------+
| Root Path                 | /Users/kenji/work/codeigniter/ci4-app-template/          |
| Write Path                | /Users/kenji/work/codeigniter/ci4-app-template/writable/ |
| Ignored Directories Count | 0                                                        |
| Ignored Files Count       | 0                                                        |
| Allow Gitignore Entry     | Allowed                                                  |
| Fall Through to Project   | Allowed                                                  |
| Maximum Retries           | 10                                                       |
| Consolidator              | Liaison\Revision\Consolidation\DefaultConsolidator       |
| Upgrader                  | Liaison\Revision\Upgrade\ComposerUpgrader                |
| Pathfinder                | Liaison\Revision\Paths\DefaultPathfinder                 |
| Diff Output Builder       | SebastianBergmann\Diff\Output\UnifiedDiffOutputBuilder   |
| Log Handlers Count        | 2                                                        |
+---------------------------+----------------------------------------------------------+

Starting software updates...

Loading composer repositories with package information
Updating dependencies                                
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Generating autoload files
56 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Found 9 files to consolidate.
[p] Proceed.
[l] List all files to consolidate.
[c] List created files only (0).
[m] List modified files only (9).
[d] List deleted files only (0).
[a] Abort.

What shall I do? [p, l, c, m, d, a]: l

+-------------------------------------------+----------+------+
| File                                      | Status   | Diff |
+-------------------------------------------+----------+------+
| app/Config/Filters.php                    | Modified | 10   |
| app/Config/Generators.php                 | Modified | 23   |
| app/Config/Mimes.php                      | Modified | 21   |
| app/Config/Paths.php                      | Modified | 9    |
| app/Config/Services.php                   | Modified | 18   |
| app/Controllers/BaseController.php        | Modified | 65   |
| app/Controllers/Home.php                  | Modified | 18   |
| app/Views/errors/html/error_exception.php | Modified | 223  |
| public/index.php                          | Modified | 9    |
+-------------------------------------------+----------+------+


Found 9 files to consolidate.
[p] Proceed.
[l] List all files to consolidate.
[c] List created files only (0).
[m] List modified files only (9).
[d] List deleted files only (0).
[a] Abort.

What shall I do? [p, l, c, m, d, a]: p

Found 9 files in conflict.
[l] List all files in conflict.
[o] Overwrite all.
[b] Create backup files then safely overwrite all.
[s] Skip all.
[r] Resolve each conflict.
[a] Abort.

What shall I do? [l, o, b, s, r, a]: o


Logs for this run can be found here:
/Users/kenji/work/codeigniter/ci4-app-template/writable/revision/logs/

Terminating: Application update was successful.
Software updates finished in 43.996 seconds.
And check the diff with git.
Reply
#3

Thank you @kenjis for the feedback.
Reply
#4

(This post was last modified: 02-01-2021, 07:18 AM by MGatner.)

Confused  I was coming to say the same thing about Patches. I didn't know you released this, I will take a look and see if we can combine forces. Thanks for sharing it.
Reply
#5

The idea behind this was originally based on your Patches, so thanks for that, and added some more to fit my requirements. ?
Reply




Theme © iAndrew 2016 - Forum software by © MyBB