CodeIgniter Forums
composer install and direct install - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31)
+--- Thread: composer install and direct install (/showthread.php?tid=77165)



composer install and direct install - pars1997 - 07-28-2020

Hi
I wonder why when I install CI4 via Composer it creates two directories that hold CI files; 1st in the project root and 2nd in  `\vendor\codeigniter4\framework`?
can I define controller, settings, models, and... in both directories? can I delete the one in the vendor folder?
why it creates 2 directories with the same files?


RE: composer install and direct install - MGatner - 07-28-2020

You can pretend that the vendor files don’t exist. They are there for reference and some modules may make use of them but they aren’t needed for your project.


RE: composer install and direct install - pars1997 - 07-31-2020

(07-28-2020, 05:43 AM)MGatner Wrote: You can pretend that the vendor files don’t exist. They are there for reference and some modules may make use of them but they aren’t needed for your project.
so I can delete the framework in the vendor folder without any effect?
so why they put it in the vendor folder?


RE: composer install and direct install - jreklund - 08-01-2020

No you can't delete the vendor folder. It contains the actual framework and default files/folder (e.g. App, public, tests, vendor ...)

All files and folders in your root catalog (app, public ...) are a identical copy vendor\codeigniter4\framework (except system folder). System folder contains the framework itself. Everything else to run the application.

That vendor folder gets updated with every version, downloading new copies of e.g. vendor\codeigniter4\framework\app\Config\Mimes.php so that you can copy/merge it with your own file app\Config\Mimes.php.

You should not touch the vendor folder at all. Only modify everything else.


RE: composer install and direct install - captain-sensible - 08-01-2020

yes agree with last post if you get anything from say https://packagist.org/ using composer, its going to end up in the vendor folder.So to ignore or delete that is going to pull the rug from under your feet.


RE: composer install and direct install - pars1997 - 08-01-2020

(08-01-2020, 06:18 AM)jreklund Wrote: That vendor folder gets updated with every version, downloading new copies of e.g. vendor\codeigniter4\framework\app\Config\Mimes.php so that you can copy/merge it with your own file app\Config\Mimes.php.
Well, now i know what it is for.
thanks.