docs(plan): 標記階段 4 完成,補相容層 lessons
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
This commit is contained in:
@@ -206,7 +206,7 @@
|
|||||||
| 1 | 安全與正確性 A1–A14(13 個 admin GET→POST、REST allowlist、DDL 白名單、Logger 3-arity fatal…) | ✅ 2026-07-31 |
|
| 1 | 安全與正確性 A1–A14(13 個 admin GET→POST、REST allowlist、DDL 白名單、Logger 3-arity fatal…) | ✅ 2026-07-31 |
|
||||||
| 2 | DDL 與並發 B1–B4(warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment) | ✅ 2026-07-31 |
|
| 2 | DDL 與並發 B1–B4(warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment) | ✅ 2026-07-31 |
|
||||||
| 3 | 架構回填(Zone_Router + Routing_Predicate;13 個 Migration Phase 類別) | ✅ 2026-07-31 |
|
| 3 | 架構回填(Zone_Router + Routing_Predicate;13 個 Migration Phase 類別) | ✅ 2026-07-31 |
|
||||||
| 4 | 相容層 E1–E7(雙向 hook 橋、67 個 AddOn alias、38 個 CLI 子指令、選單 slug redirect) | ⬜ |
|
| 4 | 相容層 E1–E7(雙向 hook 橋、57 個 AddOn alias、38 個 CLI 子指令、選單 slug) | ✅ 2026-07-31 |
|
||||||
| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ⬜ |
|
| 5 | AddOn 同步 F1–F5(Standard_Post_Interceptor、HP detector v3.4.5、WC) | ⬜ |
|
||||||
| 6 | 功能與診斷 PR-G(crypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | ⬜ |
|
| 6 | 功能與診斷 PR-G(crypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | ⬜ |
|
||||||
| 7 | 全域清理與 CI(strict_types、phpcs.xml、phpstan + baseline、gitea workflows) | ⬜ |
|
| 7 | 全域清理與 CI(strict_types、phpcs.xml、phpstan + baseline、gitea workflows) | ⬜ |
|
||||||
@@ -225,6 +225,9 @@
|
|||||||
- `Zone_Warm::set()` 改 upsert 後,**測試表也要有 `UNIQUE KEY ui_post_meta`**,否則 integration 會出現「set 沒覆蓋舊值」的假失敗。
|
- `Zone_Warm::set()` 改 upsert 後,**測試表也要有 `UNIQUE KEY ui_post_meta`**,否則 integration 會出現「set 沒覆蓋舊值」的假失敗。
|
||||||
- **B 的 unit bootstrap 會載入 `Member_Fields` / `Post_Fields`,A 的不會**。這使 Entity_Registry 在測試啟動時就有註冊 group,從 A 移植過來、假設「registry 為空」的測試(`MigrationPhaseRemainingTest`)會真的走進 `dbDelta` 而爆掉。修法是在該測試 setUp 以 reflection 清空 registry **並移除 `wpdo_register_entity_fields` listener**(phase 內部會再 fire 一次)。
|
- **B 的 unit bootstrap 會載入 `Member_Fields` / `Post_Fields`,A 的不會**。這使 Entity_Registry 在測試啟動時就有註冊 group,從 A 移植過來、假設「registry 為空」的測試(`MigrationPhaseRemainingTest`)會真的走進 `dbDelta` 而爆掉。修法是在該測試 setUp 以 reflection 清空 registry **並移除 `wpdo_register_entity_fields` listener**(phase 內部會再 fire 一次)。
|
||||||
- **快取類重構必定連帶測試隔離工作**:`Routing_Predicate::flush_cache()`(SyncBridgeEntityGuardTest)與 `Schema_Manager::flush_table_exists_cache()`(PostMigrationTest / PostEntityLifecycleTest)兩處都是 A 事後才補的,移植時要一起帶,否則出現「表被 drop 但快取說還在」的假錯誤。
|
- **快取類重構必定連帶測試隔離工作**:`Routing_Predicate::flush_cache()`(SyncBridgeEntityGuardTest)與 `Schema_Manager::flush_table_exists_cache()`(PostMigrationTest / PostEntityLifecycleTest)兩處都是 A 事後才補的,移植時要一起帶,否則出現「表被 drop 但快取說還在」的假錯誤。
|
||||||
|
- **B 自身的 slug 不一致**:`MENU_SLUG` 是 `2meet-data-optimizer`,但 help-tabs / setup-wizard / conflict-monitor / 3 個 template 共 10+ 處硬編碼 `page=wp-data-optimizer` → 這些連結原本全部 404。已統一回 `wp-data-optimizer`(與 wpdo_ 表/option/cron/hook/CLI 命名空間一致)。
|
||||||
|
- **雙向 hook 橋會暴露 test bootstrap 的 stub 缺口**:單向時 `do_action_ref_array()` 從未被走到,改雙向後兩個 bootstrap 都要補這個 stub。
|
||||||
|
- **AddOn 的 alias 必須各自做**:核心 back-compat 在 `plugins_loaded:4` 執行,AddOn 在 `:6` 才載入類別,核心的 alias 表涵蓋不到它們(57 個整合層類別先前完全沒有 `WPDO_` 名稱)。
|
||||||
- **PHP 無法 `class_alias()` 介面**。`WPDO_Migration_Phase_Interface` 沒有雙向 alias 的乾淨解法(單向 `extends` wrapper 無法讓 `instanceof` 成立),該契約是核心內部擴充點,測試改用 `TMDO_` 正式名稱即可。
|
- **PHP 無法 `class_alias()` 介面**。`WPDO_Migration_Phase_Interface` 沒有雙向 alias 的乾淨解法(單向 `extends` wrapper 無法讓 `instanceof` 成立),該契約是核心內部擴充點,測試改用 `TMDO_` 正式名稱即可。
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user