Welcome Guest, Not a member yet? Register   Sign In
composer install and direct install
#1

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?
Reply
#2

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

(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?
Reply
#4

(This post was last modified: 08-01-2020, 06:19 AM by jreklund.)

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

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

(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.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB