The CodeIgniter framework 3 Composer Installer
, (*1)
This package installs the offical CodeIgniter (version 3.1.*
) with secure folder structure via Composer., (*2)
Note: If you want to install CodeIgniter4 (under development), see https://github.com/sabri-elgueder/codeigniter-composer/tree/4.x., (*3)
You can update CodeIgniter system folder to latest version with one command., (*4)
Folder Structure
codeigniter/
โโโ application/
โโโ composer.json
โโโ composer.lock
โโโ public/
โย ย โโโ .htaccess
โย ย โโโ index.php
โโโ vendor/
โโโ codeigniter/
ย ย โโโ framework/
ย ย โโโ system/
Requirements
How to Use
Install CodeIgniter
$ composer create-project satoripophq/codeigniter-composer codeigniter
Above command installs public/.htaccess
to remove index.php
in your URL. If you don't need it, please remove it., (*5)
And it changes application/config/config.php
:, (*6)
$config['composer_autoload'] = FALSE;
โ
$config['composer_autoload'] = realpath(APPPATH . '../vendor/autoload.php');
$config['index_page'] = 'index.php';
โ
$config['index_page'] = '';
Install Translations for System Messages
If you want to install translations for system messages:, (*7)
$ cd /path/to/codeigniter
$ php bin/install.php translations 3.1.0
Install Third Party Libraries
Codeigniter Matches CLI:, (*8)
$ php bin/install.php matches-cli master
CodeIgniter HMVC Modules:, (*9)
$ php bin/install.php hmvc-modules master
Modular Extensions - HMVC:, (*10)
$ php bin/install.php modular-extensions-hmvc master
CodeIgniter Template Library:, (*11)
$ php bin/install.php codeigniter-template-library master
Ion Auth:, (*12)
$ php bin/install.php ion-auth 2
CodeIgniter3 Filename Checker:, (*13)
$ php bin/install.php filename-checker master
CodeIgniter Rest Server:, (*14)
$ php bin/install.php restserver 2.7.2
Update CodeIgniter
$ cd /path/to/codeigniter
$ composer update
You must update files manually if files in application
folder or index.php
change. Check CodeIgniter User Guide., (*15)
Reference