How to use composer packages in codeigniter?

For CodeIgniter 3.x and composer, it’s suggested to just set $config['composer_autoload'] to TRUE or a custom path in application/config/config.php.

It seems that CI assumes the vendor directory is within the application directory. That wasn’t my case. I did the following:

$config['composer_autoload'] = 'vendor/autoload.php';

Leave a Comment