4 Commits

Author SHA1 Message Date
wpdev f524ea3f16 build: 移植 PHPCS + PHPStan L6 品質 gate(PR-I 前半)
- phpcs.xml(自 A 移植):ruleset 改名、*/tools/* 例外換成 */back-compat/*、
  中文註解全域排除 Squiz.Commenting.InlineComment.InvalidEndChar、
  interface 別名檔排除 OneObjectStructurePerFile
- 檔頭正規化:16 個檔案的 declare(strict_types=1) 與前導 // 註解移到
  file docblock 之後,並移除 <?php 後多餘空行(phpcbf 另自動修 190 處)
- phpstan.neon + .phpstan/stubs.php(TMDO_ 與 WPDO_ 兩套常數)+
  重新產生的 phpstan-baseline.neon(710 errors,A 的 3877 行 baseline
  因前綴與路徑不同無法沿用)

現況:PHPCS 0 errors / 0 warnings、PHPStan L6 No errors、
unit 451 / integration 398 GREEN

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:22:00 +08:00
wpdev 76c01e44df refactor: 全部 128 個生產檔加入 declare(strict_types=1)(PR-H)
對齊 A v3.2.0。型別強制會把隱式轉換變成 TypeError,所以一次全檔加入
並跑完整測試(unit 451 / integration 398 全綠,無迴歸)。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:13:33 +08:00
wpdev f1c577df0d fix(logger): 修正 7 處 Logger::error 參數不足導致的 TypeError(A10)
TMDO_Logger::error() 簽章為 (module, hook, message, context, zone),但 7 處
以 (event, array) 兩參數呼叫 → array 傳給 string $hook 觸發 TypeError:
- 4 個 stress tester 的 batch 失敗路徑
- auto-promoter 的 promote 失敗路徑
- conflict-detector 的欄位衝突路徑
- hook-bus 的 shadow 比對例外路徑(shadow_read 模式必炸)

同時 backport A v3.3.x 的 mass column clear opt-in gate(A9):
delete_all=true 改由 wpdo_allow_mass_column_clear / tmdo_allow_mass_column_clear
filter 明確放行,取代原本「>500 列才擋」的啟發式(小站一次誤呼叫即整欄 NULL)。

註:A 對應處 class-wpdo-hook-bus.php:511,522 傳 3 個 string 給
Logger::warning(string,array),A 側自身有 TypeError,故未照搬其寫法。

unit 379 / integration 398 GREEN

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 05:12:45 +08:00
wpdev d36bb954d1 chore: initial snapshot of 2meet-data-optimizer v0.1.0
Baseline before backporting wp-data-optimizer v3.0.1-v3.4.6.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 05:06:36 +08:00