Codeigniter + Composer Codeigniter + Composer codeigniter codeigniter

Codeigniter + Composer


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


use the following code

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

Source


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';