![]() |
Hi,
As usual I update CI via composer from 4.1.9 -> 4.2.1 but this time I noticed that a lot file in "/vendor/codeigniter4/framework/app/config" got updated but my project file in "/app/config" didn't get updated. For example the new update got a file "Feature.php" where it's not reflected to my "app/config". Do I need to manually update these files or dose CI manage these updates automatically?
>Do I need to manually update these files
Yes, you need to. https://codeigniter4.github.io/CodeIgnit...-upgrading Composer update only updates "vendor/codeigniter4/framework", not update your Project Files. > dose CI manage these updates automatically? No.but there are tools for it. https://packagist.org/explore/?query=cod...%20updates
thank for help kenjis but I hit another roadblock. I went with the CLI solution. Script stopped with the below
************************************ * STAGING * ************************************ Updating files: 100% (8002/8002), done. Switched to a new branch 'tatter/scratch' cp: cannot stat 'vendor/codeigniter4/framework/app/': No such file or directory now on this new branch it had not done anything. Below are the steps I did. 1. Install the tatter/patches library and commit to make it a clean branch. 2. Update composer (to CI 4.2.1) 3. Run the CLI script (./vendor/bin/patch -v 4.2.1)
It is a strange error.
> cp: cannot stat 'vendor/codeigniter4/framework/app/': No such file or directory Why don't you have vendor/codeigniter4/framework/app/ ? I tried and got the following. Code: $ vendor/bin/patch Code: $ git diff main...tatter/patches --name-only
The problem I see is on the second step it changes the branch.
1. Updating files: 100% (8002/8002), done. 2. Switched to a new branch 'tatter/scratch' 3. cp: cannot stat 'vendor/codeigniter4/framework/app/': No such file or directory So on this new branch it's missing the vendor folder. In this new branch I can see only the stuff that I have marked to ignore on git ![]() It looks like the new branch is empty.
@chakycool I have responded to your issue in the repo: https://github.com/tattersoftware/codeig.../issues/26
If you gather the requested info I am happy to help more. My guess is either your starting point was not a healthy installation of CI4 (did not have Composer packages installed, switched from develop to release, altered paths/subdirectories) or you have included your **vendor/** folder in the repo.
Hi MGatner, I have shared all info you requested on GitHub.
I did include the vendor folder but I tried excluding it as well but ended with the same error MSG. Did install CI4 via composer and working on 2 branches (master | dev) and I tried running the scrip from both branches and no luck. Never touched any folder but the ./app folder.
kenjis thanks for confirming what Mgatner pointed out about vendoring. Just buy updating the gitignore file it did not work. I had to delete git cache for it start ignoring the vendor folder. After that all worked as expected.
I'm including the vendor folder in git cause I have deployment pipeline in place, hence I don't want the server to run composer on every push (which I do allot). Basically remember not to track the "vendor" folder if you want to run the tatter script in your projects. Thank you Kenjis and Mgatner. |
Welcome Guest, Not a member yet? Register Sign In |