CodeIgniter Forums
Composer question - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Composer question (/showthread.php?tid=75790)

Pages: 1 2


RE: Composer question - muuucho - 03-22-2020

(03-21-2020, 02:18 PM)jreklund Wrote: Yes, if we have introduced new features and fixed a set of bugs, you will get those improvements in your application right away. And with bad luck, you will also receive new bugs.
Thanks, now it is much clearer to me.


RE: Composer question - MGatner - 03-23-2020

(03-21-2020, 10:20 AM)jreklund Wrote: There are no auto-patch system, as there are no system that's smart enough.

I'm working on a module for that. Smile Nothing to share yet but stay tuned! https://github.com/tattersoftware/codeigniter4-patches


RE: Composer question - muuucho - 03-24-2020

(03-23-2020, 09:30 AM)MGatner Wrote:
(03-21-2020, 10:20 AM)jreklund Wrote: There are no auto-patch system, as there are no system that's smart enough.

I'm working on a module for that. Smile Nothing to share yet but stay tuned! https://github.com/tattersoftware/codeigniter4-patches
You guys rock!


RE: Composer question - elserra - 04-17-2020

So, let me repeat it just to see if I understood it right.

The brain of the framework is in the vendor folder so it can be updated but the app itself is living in the app folder. And the way to make sure the app runs from the files in the so folder is by namespacing it and/or extending the classes from the vendor.

That means that if I update via composer, I'll still have to check if some of the files are up to date? For example, if you update something in the (i don't know the path bc i am writing from phone)/Views.php, that would be updated, but if you change the BaseController.php, it would have no effect on updating as I would have to do it manually.

Thanks a lot for the explanation and keep it up!


RE: Composer question - jreklund - 04-18-2020

Yes, the heart and soul of CodeIgniter are in the /vendor/codeigniter4 folder. You don't need to specify the /vendor/codeigniter4 folder when extending it. CodeIgniter knows where it are located and will find itself. You can always extend \CodeIgniter, \App etc no matter where CodeIgniter files are located.

Your own code are in /app and you should NEVER touch the files in /vendor.

If we have replaced some app specific files for example /app/Config/Routes.php you will need to grab that file from /vendor/codeigniter4/app/Config/Routes.php, and patch the changes in your file.

At the time of writing these folders needs to be checked for changes:
/app/Config/
/app/Controllers
/app/Views/

There can however (of course) be new files (or directories) added to the default /app folder, or /tests, /writable etc.
https://codeigniter.com/user_guide/installation/installing_composer.html#upgrading