시작하기
Formosa Erica CI4 Leap — CI3 to CI4 Migration Kit

Formosa Erica CI4 Leap — CI3 to CI4 Migration Kit

Move your CodeIgniter 3 site to CodeIgniter 4 on PHP 8 with a migration kit from Taiwan that your AI agent follows in 9 stages, from a security audit to a cutover checklist. You keep your URLs and your CI3 code stays untouched while you rehearse the whole site in Docker before launch. Works with Claude Code and Codex. 把 CodeIgniter 3 網站升級到 CI4 與 PHP 8:AI 依 9 階段施工,先在 Docker 演練,再由你切換上線。
#엔지니어링#생산성#컨설팅
평점
더 많은 평가가 필요합니다
판매
0
사용 방법
다운로드

Formosa Erica CI4 Leap — CI3 to CI4 Migration Kit

Formosa Erica CI4 Leap: move CodeIgniter 3 to CodeIgniter 4 on PHP 8.5 (recommended) in 9 stages

Your CodeIgniter 3 site still runs on PHP 7. CI4 Leap gives your AI agent a 9-stage plan to move it to CodeIgniter 4.7.4+ on PHP 8.5 (recommended), and the agent stops to ask you at each decision that carries risk.

▶ Watch the 90-second demo (EN/中文 subtitles)

AI agents handcrafted in Taiwan|來自台灣的手作 AI 夥伴

Sound familiar?

  • Your host plans to drop PHP 7.x, and your CI3 code throws deprecation warnings on PHP 8.
  • A CI4 port means hundreds of small edits: $this->load, uri->segment(), flashdata, CSRF, hooks turned into Filters. Miss one and a page returns 500.
  • You asked a general AI agent to "upgrade this to CI4". It edited the old code in place, changed a few URLs, and printed the database password in chat.
  • The site has run unpatched for years, and you haven't checked uploads/ for web shells.

With CI4 Leap, your agent works through a fixed sequence and you review each stage.

What you get

CI4 Leap is a skill: a folder your agent loads through SKILL.md. Inside:

  • 9 stages (0 to 8). Each stage lists its steps, its outputs, a "done when" check, and the points where the agent must stop and ask you.
  • CI3 → CI4 mapping rules for loading, Request, URI, Session, redirects, DB, Email, validation, views, models, Filters, CSRF, uploads and pagination, plus PHP 8.5 rules.
  • 35 documented pitfalls from real migrations, each with symptom, cause and fix.
  • A Stage 1 security audit guide: web shell signatures, exposed sensitive files, and a database comparison against an older clean backup.
  • Reusable CI4 components: 11 libraries (UploadGuard, Captcha, FormThrottle, HtmlSanitizer, OffsetPager, Mailer and more), 4 filters (admin auth, deny-by-default ACL, user status, shop gate), .htaccess templates and a .env.example with placeholders.
  • Templates for MIGRATION_NOTES.md and per-module reports, so you can see what changed, what the agent left out, and which decisions still wait for you.

Your agent follows these ground rules for the whole run:

  • It leaves your CI3 source untouched and writes the new site to CI4/.
  • It keeps your URLs, session field names and table structures as they are.
  • It commits to your local git when you ask, and it does not push.
  • It keeps credentials in .env and never prints them.
Before and after: a CI3 controller and the same controller in CI4

A taste of the mapping rules:

// CI3
$id = $this->uri->segment(3);
if (! $row) show_404();

// CI4, per the kit's mapping rules
$id = $this->request->getUri()->getSegments()[2] ?? '';
if (! $row) {
    throw \CodeIgniter\Exceptions\PageNotFoundException::forPageNotFound();
}

The 9 stages

The 9-stage CI4 Leap workflow, with the stops where the agent asks you
# Stage What your agent does Stops to ask you
0 Prerequisites & Environment Check Confirms the project root, detects Docker, asks you to pick the PHP branch, collects site details in one round Yes: project root, PHP branch, missing Docker
1 Inventory, Backup & Security Audit Backs up CI3, inventories controllers, models, views and routes, scans for web shells, splits the site into modules Yes: you approve findings and module split
2 CI4 Skeleton & Core Sets up appstarter, Config, BaseController, Filters, shared libraries No
3 Module Porting Ports modules, in parallel if your agent supports subagents For business decisions
4 Integration & Hardening Merges routes and ACL, builds a URL diff (target: 0 missing), adds CSRF, upload, session and OAuth hardening Lists behavior changes for you
5 PHP 8.5 Compatibility Scan Lints for your chosen PHP branch and 8.5, fixes deprecations No
6 Docker Rehearsal Runs the full site in Docker and tests each page and role Yes, if your setup needs clicks from you (e.g. a NAS UI)
7 Testing & Verification Builds a page-by-page test list and runs it Yes: browser checks for OAuth, email, uploads
8 Handoff & Cutover Checklist Packages the release, lists new .env keys, prepares database migration and a restore plan Yes: you sign off and perform the cutover

Sample output

Stage 0: the brief your agent prepends to each task (excerpt)

Project info:
- Project root: {{PROJECT_ROOT}}; domain: {{DOMAIN}}
- Current: CodeIgniter 3.x + PHP 7.x
- Target: CodeIgniter 4.7.4+ on PHP 8.5 (recommended; you pick any supported branch at Stage 0)
- Docker test environment: {{TEST_ENV_DESCRIPTION}}
Rules:
- Do not modify any CI3 file; all new code goes in CI4/.
- Auto-routing is off; URLs must be identical to CI3.
- Do not change session field names or table structures.
- For credentials, write only key names and source files, never values; never push.

Stage 8: from the handoff & cutover checklist (excerpt)

Pre-cutover gate (no cutover until every item is checked)
- [ ] Web shells and suspicious files from the Stage 1 audit are deleted on production.
- [ ] Every credential that needs rotating is rotated, new values in .env only.
- [ ] Production PHP is the latest patch release of a supported branch.

Cutover order: wait for your OK before each step.
1. Enable maintenance or suspend public service.
2. Back up production code and database; confirm the backups open.
3. Deploy the package (follow the do-not-overwrite list).
4. Rebuild ci_sessions right away.
5. Verify, including a check from a phone on mobile data.
6. Resume public service.
Sample output: a Stage 1 security findings table and a Stage 8 checklist

Install

Download the kit from your Capafy library and unzip it. Keep the folder name formosa-erica-ci4-leap.

Claude Code (choose one)

  • Project level: <your project>/.claude/skills/formosa-erica-ci4-leap/
  • User level: $HOME/.claude/skills/formosa-erica-ci4-leap/

Codex (choose one)

  • Project level: <your project>/.agents/skills/formosa-erica-ci4-leap/
  • User level: $HOME/.agents/skills/formosa-erica-ci4-leap/

At project level, add the skill folder to .gitignore so it stays out of your repository. Restart your agent session, open it in the root folder of your CI3 project, and ask:

Use the formosa-erica-ci4-leap skill to migrate this CodeIgniter 3 site to CodeIgniter 4. Start with Stage 0.

Requirements

  • Claude Code or Codex, or another agent that loads skills from a SKILL.md folder.
  • Docker that can run your chosen PHP branch (8.5 recommended) with MySQL or MariaDB. Use Docker on your own computer, Container Manager on a Synology NAS, or Docker on another host. Your AI builds the test environment for your setup from the kit's reference examples. If Stage 0 finds no Docker, the agent stops and suggests an install method for your OS.
  • git, Composer and PHP CLI, installed on your machine or run inside the container.
  • Your CI3 source code and a recent SQL dump.
  • An AI plan with room for a long job. A full migration spans many sessions. Your AI provider bills that usage under your own plan, and the cost grows with the size of your site.
Where the Docker test environment can run: your computer, a Synology NAS, or another host

Security hardening highlights

Security hardening built into CI4 Leap
  • Stay on a supported PHP branch. PHP 7.4 reached end of support on 2022-11-28. The agent asks you to pick a branch still supported on php.net (8.5 recommended) and to run its latest patch release.
  • CodeIgniter 4.7.4 minimum. Earlier 4.x releases have published advisories for upload validation bypass and SQL injection. Stage 8 also runs composer audit.
  • Web shell and sensitive file inventory in Stage 1. The agent does not port, commit or package suspicious files, and it scans the final package against an allowlist.
  • Session regeneration on login and on each role elevation, OAuth callbacks included.
  • OAuth checks for state, nonce and email_verified.
  • Telegram webhook secret check with hash_equals. The webhook rejects requests when the secret is empty.
  • Site-wide CSRF, POST-only writes, a deny-by-default admin ACL, security headers, and server-side price re-lookup for shops.
  • A private test environment. The Docker rehearsal stays off the public internet.
  • Production stays off limits until you authorize access in the session, read-only requests included.

The security audit is a defensive inventory that helps you decide what to clean up. It does not replace a professional incident response, and it does not prove a site is clean.

Limitations, up front

  • No deployment. The kit produces a package and a checklist. You perform the final cutover on your own host.
  • No promise of zero bugs. Results depend on your agent, your model and your codebase. Review the code and each stage's output before going live.
  • AI usage is on you. The kit does not include AI credits.
  • CI3 to CI4 only. CodeIgniter 2, other frameworks and plain PHP apps fall outside the mapping rules.
  • Some steps need your hands: browser tests for OAuth and email, NAS UI clicks, and anything that touches production.

FAQ

Does it work with Codex?
Yes. Install it under .agents/skills/ (project or user level). Without subagents, your agent runs the stages one by one. You get the same outputs over a longer run.

Do I need Docker?
Yes, for the Stage 6 rehearsal. Your own computer, a Synology NAS or another host all work, and your AI sets up the environment. If you have no Docker yet, the agent suggests how to install it.

Which PHP version will it use?
You choose. At Stage 0 the agent lists the branches still supported on php.net with their end-of-support dates and waits for your answer. 8.5 is recommended; whichever branch you pick, use its latest patch release.

Will it connect to my production server?
Not on its own. The agent works in your project folder and your Docker test environment. Any request to production, even a read-only HEAD check, waits for your explicit approval in the session, and you perform the cutover yourself.

Can I use it on client projects?
Yes. One license covers one individual or one team (employees and contractors) on its own projects, client work included. Your clients receive the code you deliver, and they don't need a license for it.

Can I resell it or share it?
No. You may not resell, share or republish the kit, its documentation or its templates as a package, or use them to train AI models. Code you generate with the kit belongs in your projects, open-source ones included.

How do I get updates?
All v1.x releases are free. Download the latest version from your Capafy library and replace the installed folder. CHANGELOG.md lists what changed.

Can I get a refund?
Refunds follow Capafy's Terms of Service, which include a 7-day refund window. Request it through Capafy.

Which CI3 versions does it support?
The rules target CodeIgniter 3.x sites running on PHP 7.x. Renamed application, system or views folders are fine; the agent reads them from your root index.php in Stage 1.

What about HMVC or modular extensions?
The kit has no dedicated HMVC rules. Your agent inventories module folders in Stage 1 like any other code and maps them to CI4 namespaces or folders, but expect more decisions to come back to you.

What about third-party libraries and Composer packages?
Stage 1 lists everything in third_party/ and vendor/, and flags unknown files there. Stage 5 checks Composer packages against PHP 8.5 (composer why-not php 8.5.0). Libraries with no PHP 8 version need a replacement, and the agent asks you to choose one.

Is this a one-click converter?
No. Your AI ports the code with you, stage by stage, and you review and decide at each stop.

License summary

  • One individual, or one team or organization (employees and contractors), on its own projects, client projects included.
  • Use and modify the kit for your own work. Code you generate with it, or copy from its templates, is yours to ship, open source included.
  • No resale, sharing, republishing or marketplace listing of the kit or its templates, and no AI training on its contents.
  • Provided as is, without warranty. You review the code, keep backups and run the cutover.
  • The license ends if you break these terms. Code already in your projects stays usable.
  • Full terms: LICENSE in the download.

🇹🇼 中文說明

CI4 Leap 是什麼: 一套給 Claude Code/Codex 用的 skill。你的 AI 照著 9 個階段,把 CodeIgniter 3 + PHP 7.x 網站改版成 CodeIgniter 4.7.4 以上、PHP 8.5(建議;階段 0 由你選擇仍受官方支援的分支,一律用最新修正版)。遇到有風險的決定,AI 會停下來問你。

你會拿到:

  • 0~8 共 9 個階段,每階段寫明步驟、產出、完成標準與必停點。
  • CI3 → CI4 對照規則、PHP 8.5 規則,以及 35 個實戰踩雷紀錄(症狀、原因、解法)。
  • 第 1 階段資安盤點指南:webshell 特徵、外洩敏感檔、新舊資料庫比對。
  • 11 個 CI4 library、4 個 filter、.htaccess 與 .env.example 範本。

AI 遵守的規矩: CI3 原始碼不動,新網站寫在 CI4/;網址、session 欄位、資料表結構不變;不 push;帳密只放 .env,不印出來;碰正式主機前一定先問你。

需要準備:

  • Claude Code 或 Codex。
  • 能跑你選定的 PHP 分支(建議 8.5)與 MySQL/MariaDB 的 Docker,放在你的電腦、Synology NAS 或其他主機都可以,由你的 AI 依你的環境建置。
  • git、Composer、PHP CLI。
  • CI3 原始碼與最新的 SQL 備份檔。
  • 足夠的 AI 用量。完整改版要跑很多個工作階段,費用依你的 AI 方案計算。

先講清楚的限制:

  • 本套件不負責部署。它產出打包檔和交付與切換檢查表,最後切換上線由你自己執行。
  • 不保證零錯誤,上線前請審查程式碼與每階段產出。
  • AI 額度由你自行負擔。
  • 只處理 CI3 → CI4;CI2、其他框架不在範圍內。HMVC 沒有專屬規則,需要你做較多決定。

常見問題精簡版:

  • 支援 Codex 嗎?支援,裝在 .agents/skills/。
  • 一定要 Docker 嗎?要,用來做第 6 階段演練。
  • PHP 用哪一版?由你在階段 0 選擇,建議 8.5,一律用最新修正版。
  • 會連我的正式主機嗎?要等你在對話中明確同意才會連,唯讀檢查也一樣。
  • 能用在客戶專案嗎?可以,一份授權涵蓋一個人或一個團隊。
  • 可以轉售或分享嗎?不行,也不得拿來訓練 AI。
  • 更新怎麼拿?v1.x 全部免費,從 Capafy 收藏庫重新下載。
  • 退款?依 Capafy 服務條款,享 7 天退款期。

Free updates for all v1.x releases.

Support: [email protected]

Not affiliated with Bank of America or its Erica assistant. CodeIgniter is a trademark of its respective owners; this is an independent product.

© 2026 Formosa Erica.