CodeIgniter4 Application Template
This template changes the default configuration of CI4 more secure.
This repository includes:
$ composer create-project kenjis/ci4-app-template your-project
$ git clone https://github.com/kenjis/ci4-app-template.git your-project
$ cd your-project/
$ composer install
$ git checkout -b main
Update Composer packages:
$ composer update
Update your CodeIgniter4 project files:
$ php spark revision:update
app/Config/Services.php
, even if third-party CI4 packages have their own Services.csp_script_nonce()
and csp_style_nonce()
for inline contents. See https://codeigniter4.github.io/CodeIgniter4/outgoing/response.html#inline-contentConfig\Services
extends CodeIgniter\Config\Services
. app/Config/Services.php.index.php
is removed.
Config\CURLRequest::$shareOptions
is disabled. (Since v4.4.0, this is set by default.)
numberNative
is enabled.
$tokenRandomize
is enabled.
$autoNonce
is disabled.
Config\Feature::$multipleFilters
is enabled.
develop
version CI4. app/Config/Paths.php.
composer test // Run PHPUnit
composer cs-fix // Fix the coding style
composer cs // Check the coding style
composer sa // Run static analysis
composer run-script --list // List all commands