Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Codeigniter + Composer

I would like to start learning Codeigniter. But it seems that Codeigniter has not support for installation via Composer. When I search in Google I found this link. It seems that Codeigniter has not support for autoload.php file created by Composer. The documentation describes the only installation via downloading .zip archive. I am not sure if Codeigniter is a good choice now. Is it?

like image 694
Čamo Avatar asked Sep 01 '15 19:09

Čamo


4 Answers

It has composer support in version 3. According to the documentation you can set in application/config/config.php .

$config['composer_autoload'] = TRUE;  //around 134 line

It will search for composer autoload script inside application/vendor . Place composer.json inside application(Codeigniter's application folder, not the root) folder. Then run composer init, and then - composer install.

And if CI fits you, then its right tool for your job:)

p.s. there is also a composer installer here https://github.com/kenjis/codeigniter-composer-installer

like image 174
cssBlaster21895 Avatar answered Oct 13 '22 23:10

cssBlaster21895


use the following code

composer create-project kenjis/codeigniter-composer-installer codeigniter

Source

like image 30
Yassine Sedrani Avatar answered Oct 13 '22 22:10

Yassine Sedrani


According to the documentation you can configure the config.php file inside config folder,

change the $config['composer_autoload'] line to

$config['composer_autoload'] = TRUE; 

or use path

$config['composer_autoload'] = FCPATH . 'vendor/autoload.php'; 
like image 38
Saleeshprakash Salu Avatar answered Oct 13 '22 23:10

Saleeshprakash Salu


Tips 1:

A Multi-Framework Composer Library Installer

http://composer.github.com/installers

Tips 2:

composer create-project kenjis/codeigniter-composer-installer codeigniter
like image 21
venkatskpi Avatar answered Oct 13 '22 22:10

venkatskpi