docs(plan): 記錄 backport v3.0.1-v3.4.6 的 8 階段規劃與階段 0 完成
階段 0(回歸網)已完成:composer dev 依賴齊備、兩個 test bootstrap 補 TMDO_FSM_GUARD_DISABLED、phpunit.xml failOnWarning=true、HealthCronTest 的 SHOW TABLES/INFORMATION_SCHEMA mock 對齊 A v3.2.0。 unit 379 tests / 778 assertions GREEN integration 398 tests / 1139 assertions GREEN Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -194,6 +194,33 @@
|
||||
|
||||
---
|
||||
|
||||
## Backport wp-data-optimizer v3.0.1–v3.4.6(2026-07-31 起)
|
||||
|
||||
完整計畫:`~/.claude/plans/a-data-www-studio-wp-local-dev-wp-conten-imperative-wind.md`
|
||||
|
||||
背景:B 分叉自 A **v3.0.0**(2026-05-15 11:40),A 其後又走了 92 個 commit 到 v3.4.6,無一回流。目標是全量對齊後讓 `wp-data-optimizer` 退休。
|
||||
|
||||
| 階段 | 內容 | 狀態 |
|
||||
|---|---|---|
|
||||
| 0 | 回歸網:composer dev 依賴、test bootstrap FSM guard、`failOnWarning=true`、12 個 repo `git init` | ✅ 2026-07-31(unit 379 / integration 398 全綠) |
|
||||
| 1 | 安全與正確性 A1–A14(13 個 admin GET→POST、REST allowlist、DDL 白名單、Logger 3-arity fatal…) | ⬜ |
|
||||
| 2 | DDL 與並發 B1–B4(warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment) | ⬜ |
|
||||
| 3 | 架構回填(Zone_Router + Routing_Predicate;13 個 Migration Phase 類別) | ⬜ |
|
||||
| 4 | 相容層 E1–E7(雙向 hook 橋、67 個 AddOn alias、38 個 CLI 子指令、選單 slug redirect) | ⬜ |
|
||||
| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ⬜ |
|
||||
| 6 | 功能與診斷 PR-G(crypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | ⬜ |
|
||||
| 7 | 全域清理與 CI(strict_types、phpcs.xml、phpstan + baseline、gitea workflows) | ⬜ |
|
||||
| 退休 | 兩站台切到 B、移除 A、B 升 1.0.0 | ⬜ |
|
||||
|
||||
### Lessons learned(backport)
|
||||
|
||||
- **階段 0 的初始 git 快照已包含階段 0 的修復**(composer.json / 兩個 bootstrap / phpunit.xml / HealthCronTest),不是純粹的 pre-change 現況。要看純現況請比對 A 或 `dist/` 內的 v0.1.0 ZIP。
|
||||
- `composer update` 後 autoload 出現 `WPDO_Entity_Adapter_Interface` 三重宣告警告(`includes/adapters/interface-entity-adapter.php`、`back-compat/interface-wpdo-entity-adapter-alias.php`、`back-compat/trait-wpdo-anti-eav-aware-alias.php`)→ 階段 4 E2 要刪掉重複的那一份。
|
||||
- `TMDO_FSM_GUARD_DISABLED` 兩個 test bootstrap 原本都沒 define,但 `class-tmdo-feature-flags.php:128` 會檢查它 → 強制 FSM 轉換的測試會被 guard 擋掉(A 在 v3.4.6 踩過同一個坑)。
|
||||
- integration 測試需要 `TMDO_TEST_DB_PASS`(或 `WPDO_TEST_DB_PASS`)環境變數,DB 為本機 `wp_wpdo_test`。
|
||||
|
||||
---
|
||||
|
||||
## Git tag plan
|
||||
|
||||
- `v0.1.0` — 本 release(Phase 0-4 完成)
|
||||
|
||||
Reference in New Issue
Block a user