kenjis/ci4-app-template
Composer 安装命令:
composer create-project kenjis/ci4-app-template
包简介
CodeIgniter4 application template
README 文档
README
This template changes the default configuration of CI4 more secure.
This repository includes:
- CodeIgniter 4.4.5
- Translations for CodeIgniter 4 System Messages dev-develop
- CodeIgniter DevKit 1.2.0
- PHPUnit 9.6.16
- Tatter\Patches 2.1.0
- Liaison Revision 1.1.0
- bear/qatools 1.10.0
Requirements
- PHP 7.4 or later
How to Install
Composer
$ composer create-project kenjis/ci4-app-template your-project
Git
$ git clone https://github.com/kenjis/ci4-app-template.git your-project $ cd your-project/ $ composer install $ git checkout -b main
How to Update
Update Composer packages:
$ composer update
Update your CodeIgniter4 project files:
$ php spark revision:update
How to Use
Services
- All Services must be manually added to
app/Config/Services.php, even if third-party CI4 packages have their own Services.
CSRF
- You must set CSRF token field in your form manually. See https://codeigniter4.github.io/CodeIgniter4/libraries/security.html#html-forms
CSP
- You must set CSP when you need. See https://codeigniter4.github.io/CodeIgniter4/outgoing/response.html#content-security-policy
- You need to use
csp_script_nonce()andcsp_style_nonce()for inline contents. See https://codeigniter4.github.io/CodeIgniter4/outgoing/response.html#inline-content
Changes from the CI4 Default Configuration
Services
- Auto-Discovery of services is disabled. app/Config/Modules.php.
Config\ServicesextendsCodeIgniter\Config\Services. app/Config/Services.php.
Configs
- BaseURL's
index.phpis removed. - Auto Routing (Improved) is enabled.
Config\CURLRequest::$shareOptionsis disabled. (Since v4.4.0, this is set by default.)- MySQLi's
numberNativeis enabled. - Using Session-based CSRF protection.
- CSRF protection
$tokenRandomizeis enabled. - CSP is enabled.
- CSP
$autoNonceis disabled. - Strict Validation Rules are used. (Since v4.3.0, this is set by default.)
Filters
- CSRF filter is enabled.
- InvalidChars filter is enabled.
- SecureHeaders filter is enabled.
Features
Config\Feature::$multipleFiltersis enabled.
Others
- Using
developversion CI4. app/Config/Paths.php.
Available Commands
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
Related Projects for CodeIgniter 4.x
Libraries
- CodeIgniter 3 to 4 Upgrade Helper
- CodeIgniter3-like Captcha
- PHPUnit Helper
- CodeIgniter4 Attribute Routes
- CodeIgniter Simple and Secure Twig
- CodeIgniter4 Viewi Demo
Tutorials
- CodeIgniter 4 News Tutorial
- CodeIgniter 4 Validation Tutorial
- CodeIgniter4 Code Modules Test
- CodeIgniter 4 File Upload
Building Development Environment
kenjis/ci4-app-template 适用场景与选型建议
kenjis/ci4-app-template 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 403 次下载、GitHub Stars 达 18, 最近一次更新时间为 2021 年 02 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「codeigniter」 「project template」 「codeigniter4」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 kenjis/ci4-app-template 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 kenjis/ci4-app-template 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 kenjis/ci4-app-template 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
The CodeIgniter Redis package
Task system for APPUI
Simple ASCII output of array data
E2E Studios PHP Framework adaptation of leafsphp/blade package
An introduction to machine learning in Rubix ML using the famous Iris dataset and the K Nearest Neighbors classifier.
统计信息
- 总下载量: 403
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 18
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-11