CodeIgniter Forums
Codeigniter download install web vs Composer - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forum-5.html)
+--- Forum: Installation & Setup (https://forum.codeigniter.com/forum-9.html)
+--- Thread: Codeigniter download install web vs Composer (/thread-74348.html)



Codeigniter download install web vs Composer - Corsari - 09-13-2019

Hello

Just wondering about the difference between download and install the archive from
https://codeigniter.com/download

vs installing it through
Code:
composer create-project CodeIgniter/framework my-ci-app


I mean

why with the composer method I find a vendors subdir with so many vendors subfolders?

with composer I tried both the packages
Code:
CodeIgniter/framework
Code:
bcit-ci/framework

with either, I find the vendor subdir with so many folders while the web archive doesn't have the vendors subdir

Is it because the two composer packages are unofficial?

Thank you for explaining the difference


RE: Codeigniter download install web vs Composer - ciadmin - 09-13-2019

Your first link refers to a manual install. Everything gets expanded into the folder you extract into.
The second install link refers to a composer install. Composer is a PHP dependency manager, and it automatically pulls in any external packages, putting them all into the "vendor" folder. That is "normal".

Your manual install has a composer.json file in it, defining the dependencies. If you run "composer update" inside the folder, you will end up with the same "vendor" subfolder as with the composer install.

The vendor folder contains the external packages needed to run unit testing for the framework files.

"bcit-ci/framework" has been replaced with "codeigniter/framework". If you look at the entry on packagist.org, you will see "This package is abandoned and no longer maintained. The author suggests using the codeigniter/framework package instead. "


RE: Codeigniter download install web vs Composer - Corsari - 09-13-2019

Ouh!

Thank you ciadmin for such prompt and fast reply!!!

I got it

I kindly take advantage of your knowledge (if you allow)

The content of the vendors subdir ... who is supposed to use/take advantage of the vendors subdir content?

(I'm sorry to ask, but because of leak of time, I'm still in a learning stage about PHP-OOP, codeigniter and recently composer)

but more and for the sake of other newbies learning ... e.g. should anybody run "composer updated" and HAVE that vendors folder? Maybe for security purpose or whatever

or

that is optional and those are just more libraries and helpers for advanced developers?

Thank you for teaching


RE: Codeigniter download install web vs Composer - ciadmin - 09-14-2019

The vendor folder for CodeIgniter 3 contains the dependencies needed for unit testing the framework. Any developer can run "composer update" and pull the latest version of those in to "vendor", without harming their production app.

CodeIgniter 4 provides for addins being loaded with composer, so the "vendor" folder is more integral to many apps (if they use addins), and "composer update" might *have* to be run to pull in the latest version of needed external components.

If new to PHP-OOP, it's probably a good idea to avoid composer until you need it for a third party addin that you want to add to your app without having to manually download it and copy the files into your project folder.


RE: Codeigniter download install web vs Composer - Corsari - 09-21-2019

Sorry to be disappeared for a while

thank you again so much for your your patient, gentle and kind explanations and answers

Robert