Welcome Guest, Not a member yet? Register   Sign In
Automatic Project Updating
#1

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/framewor...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!
Reply
#2

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.
Reply
#3

Thank you man its huge help for developer #_#
Enlightenment  Is  Freedom
Reply
#4

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
Reply
#5

Thanks @MGatner , Great asset to the framework.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#6

@b126 You need to merge "tatter/patches" branch, not "tatter/scratch".
Reply
#7

(This post was last modified: 02-21-2023, 06:33 AM by b126.)

(02-20-2023, 05:51 PM)kenjis Wrote: @b126 You need to merge "tatter/patches" branch, not "tatter/scratch".

Unfortunately, I only see my master branch + the new tatter/scratch
Is there a command to discover the tatter/patches branch?

For info, I got no error when launching the patch command.
Here below is an extract :


Code:
C:\wamp64\www\appgroup2>c:\wamp64\www\appgroup2\vendor\bin\patch

git version 2.39.2.windows.1
Composer version 2.5.2 2023-02-04 14:33:22
************************************
*          CONFIGURATION          *
************************************

Scripts Directory: c:\wamp64\www\appgroup2\vendor\bin\/../tatter/patches/src
Project Directory: /c/wamp64/www/appgroup2
Target Version:
Current Version:
Source Package:    codeigniter4/framework
Base Branch:      master
Selected Items:    app/ public/ env spark

************************************
*            STAGING              *
************************************

Switched to a new branch 'tatter/scratch'
warning: in the working copy of 'app/.htaccess', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/Common.php', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/Config/App.php', LF will be replaced by CRLF the next time Git touches it
...
...
warning: in the working copy of 'spark', LF will be replaced by CRLF the next time Git touches it
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
44 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
No security vulnerability advisories found
warning: in the working copy of 'app/.htaccess', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/Common.php', LF will be replaced by CRLF the next time Git touches it
warning: in the working copy of 'app/Config/App.php', LF will be replaced by CRLF the next time Git touches it
...
...
warning: in the working copy of 'spark', LF will be replaced by CRLF the next time Git touches it
On branch tatter/scratch
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        composer.json
        composer.lock

nothing added to commit but untracked files present (use "git add" to track)


And this is what I have with a git branch


Code:
C:\wamp64\www\appgroup2> git branch
* master
  tatter/scratch
Reply




Theme © iAndrew 2016 - Forum software by © MyBB