kenjis / codeigniter-composer-installer
Package to install CodeIgniter3 via Composer with secure folder structure.
Installs: 56 093
Dependents: 0
Suggesters: 0
Security: 0
Stars: 377
Watchers: 45
Forks: 117
Open Issues: 2
Type:project
Requires
- codeigniter/framework: 3.1.*
Suggests
- kenjis/ci-phpunit-test: An easier way to use PHPUnit with CodeIgniter 3.0
- kenjis/codeigniter-cli: A command-line tool for CodeIgniter 3.0
- kenjis/codeigniter-deployer: A Deployment Tool for CodeIgniter 3.0
- kenjis/codeigniter-doctrine: A simple Doctrine integration for CodeIgniter 3.0
- kenjis/codeigniter-ss-twig: A Simple and Secure Twig integration for CodeIgniter 3.0
README
This package installs the offical CodeIgniter (version 3.1.*
) with secure folder structure via Composer.
You can update CodeIgniter system folder to latest version with one command.
Folder Structure
codeigniter/
├── application/
├── composer.json
├── composer.lock
├── public/
│ ├── .htaccess
│ └── index.php
└── vendor/
└── codeigniter/
└── framework/
└── system/
Requirements
- PHP 5.3.7 or later
composer
command (See Composer Installation)- Git
How to Use
Install CodeIgniter
$ composer create-project kenjis/codeigniter-composer-installer codeigniter
Above command installs public/.htaccess
to remove index.php
in your URL. If you don't need it, please remove it.
And it changes application/config/config.php
:
$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:
$ cd /path/to/codeigniter
$ php bin/install.php translations 3.1.0
Install Third Party Libraries
$ php bin/install.php matches-cli master
$ php bin/install.php hmvc-modules master
$ php bin/install.php modular-extensions-hmvc codeigniter-3.x
$ php bin/install.php ion-auth 2
CodeIgniter3 Filename Checker:
$ php bin/install.php filename-checker master
$ php bin/install.php restserver 2.7.2
CodeIgniter Developer Toolbar:
$ php bin/install.php codeigniter-develbar master
Run PHP built-in server (PHP 5.4 or later)
$ cd /path/to/codeigniter
$ bin/server.sh
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.