Search code examples
composer-phpcodeigniter-3

How to update CodeIgniter with Composer?


I switched from Symfony to CodeIgniter and I would like it to stay up-to-date with the framework.

I understand that you can easely install and update all kind of packages, I know how to do it as I did it over and over again with Symfony.

I already set $config['composer_autoload'] = TRUE; in application/config/config.php. (Thanks to a lot of other SO questions)

My problem: Composer seems to update all the packages fine, but not the framework itself. Is it possible or am I doomed to do it manually?

EDIT

Please consider using CodeIgniter 4, which is made to be used with Composer from the start. CodeIgniter 3 is old and should only be used on legacy projects.


Solution

  • CodeIgniter hasn't been made as a composer package… except that someone eventually did it anyway!

    It is possible to keep CodeIgniter up-to-date by installing it throught composer in the first place. The project is hosted on GitHub.

    In order to use it, it's quite easy: composer create-project kenjis/codeigniter-composer-installer codeigniter should do the trick!