10 Commits

Author SHA1 Message Date
wpdev 5e11c882aa docs(plan): 記錄 AddOn 測試基建與全家族測試現況
Anti-EAV Lint + Quality Gate / anti-eav-lint (push) Successful in 19s
Tests / Unit Tests (push) Successful in 12s
Tests / Integration Tests (push) Failing after 10s
Tests / PHP Lint (push) Successful in 11s
Tests / PHPCS (push) Successful in 23s
Tests / PHPStan (push) Failing after 11s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:21:07 +08:00
wpdev c300d56aef docs(plan): 記錄打包後需重跑 composer install 的踩坑
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:13:14 +08:00
wpdev e246c9539e docs(plan): 更新 CI 與測試補齊進度
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:11:35 +08:00
wpdev 77b4501682 ci: 移植 gitea workflows + ci-package.sh(PR-I 後半)
.gitea/workflows/
- test.yml:unit / integration / lint / phpcs,外加 A 從未有過的 phpstan job。
  env 改 TMDO_TEST_DB_*(bootstrap 仍相容 WPDO_TEST_DB_*),host-mode runner
  直連本機 MariaDB,保留 A v3.4.6 的 DB preflight(區分 INFRA 失敗與測試失敗)
- anti-eav-lint.yml:TMDO_HOST 指向 dev30、改用 wp tmdo lint、slug 換成
  2meet-data-optimizer
- release.yml:v* tag 觸發,test-gate 加跑 phpstan

scripts/ci-package.sh
  依專案規範委派給共用的 scripts/package-plugin.sh(10 項終檢、統一排除清單、
  輸出 wp-local-dev/dist/),而不是自帶一份排除邏輯;找不到共用腳本時才走
  最小 fallback 並明確警告該路徑跳過終檢。

實測:bash scripts/ci-package.sh → 10 項終檢全 PASS
(552 KB / 185 entries、schema drift 34 CREATE vs 34 DROP 對齊)

註:B 目前沒有 git remote,workflow 檔案就緒但要推上 gitea 才會實際執行。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 09:11:04 +08:00
wpdev cd03d66151 test: 補 HookBus 與 audit 寫入的 integration 回歸網(PR-I)
HookBusIntegrationTest(14 tests,自 A 移植)
  integration bootstrap 原本只載入 hook-bus-bridge、沒載入 hook-bus 本體,
  所以連 WPDO_Hook_Bus alias 都建不出來 — 一併補 auto-promoter 與 hook-bus。

AuditLoggerIntegrationTest(4 tests,新寫)
  直接鎖住上一個 commit 修掉的 fatal:
  - after_write 必須寫出一列 audit(覆蓋 Logger::trace_id() 缺失)
  - group_name / action 兩欄必須有值(SCHEMA_VERSION 2.1.0 新增)
  - trace_id 必須是 UUIDv4 且同一 request 內共用
  - 未註冊的 key 不得寫入
  tearDownAfterClass 卸掉 listener 而非 drop 表,否則後續測試類的受管寫入
  會打到不存在的表;integration bootstrap 連帶補 remove_action() stub。

註:TermCommentBackfillTest 未移植 — 它 require HP AddOn 的
class-*-hivepress-term-comment-fields.php,屬 HP AddOn 測試套件而非核心。

unit 451 / integration 416 GREEN、PHPCS 0/0

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 08:55:12 +08:00
wpdev d8e7a7190a docs(plan): 記錄 dev30 實機驗證結果
A 33 OK + 15 WC MISSING → B 49 OK / All checks passed。
alias / CLI 雙命名空間 / anti-EAV 寫入 / audit 欄位 / REST allowlist
逐項實測通過;brandcards 的 doctor_callback 在新 ABI 下仍正常。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 08:30:52 +08:00
wpdev ae99820bbc fix(logger): 補回 TMDO_Logger::trace_id()(實機驗證抓到的 fatal)
TMDO_Audit_Logger::write_row() 第 160 行呼叫 TMDO_Logger::trace_id(),
但 B 提煉時漏掉了這個方法(A 有,class-wpdo-logger.php:35-47)。
先前 Audit_Logger::init() 從未被註冊,所以這個 fatal 一直藏著;
A12 把它掛上之後,任何一次受管 meta 寫入都會炸。

PHPUnit 沒有覆蓋 audit 寫入路徑,是在 dev30 實機跑
WPDO_API::set_entity() 時才暴露的。

trace_id() 產生 request-scoped UUIDv4,讓同一次請求寫出的所有 audit
row 共用同一個關聯 id。

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 08:29:08 +08:00
wpdev 5385d72346 docs(plan): 標記階段 5-7 進度、列出 follow-up 與 ABI 變更
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TbG1keQQ7XBa7qMQY16KCY
2026-07-31 06:22:36 +08:00
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
141 changed files with 5540 additions and 312 deletions
+66
View File
@@ -0,0 +1,66 @@
name: Anti-EAV Lint + Quality Gate
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master]
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
cancel-in-progress: true
jobs:
anti-eav-lint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Composer install (no-dev)
run: |
if [ -f composer.json ]; then
composer install --no-dev --optimize-autoloader --no-interaction
fi
- name: PHP syntax lint
run: |
set -e
FAILED=$(find . -name '*.php' \
-not -path './vendor/*' \
-not -path './node_modules/*' \
-not -path './e2e/*' \
-not -path './tests/*' \
-exec php -l {} \; 2>&1 | grep -v 'No syntax errors' || true)
if [ -n "$FAILED" ]; then
echo "PHP syntax errors detected:"
echo "$FAILED"
exit 1
fi
- name: Anti-EAV strict lint
run: |
if ! command -v wp >/dev/null 2>&1; then
echo "wp-cli not available; skipping anti-eav lint"
exit 0
fi
# dev30 hosts the plugin family this repo belongs to.
TMDO_HOST="/var/www/Studio/wp-local-dev30"
if [ -d "$TMDO_HOST" ]; then
wp --path="$TMDO_HOST" tmdo lint --plugin="${GITHUB_WORKSPACE}" --strict
else
echo "TMDO_HOST not found; skipping anti-eav lint"
fi
- name: Packaging audit (10-check)
run: |
# package-plugin.sh lives in the wp-local-dev tree and is shared by all
# custom plugins; its output goes to wp-local-dev/dist/.
PACKAGING_HOST="/var/www/Studio/wp-local-dev"
if [ -d "$PACKAGING_HOST" ]; then
SLUG="2meet-data-optimizer"
bash "$PACKAGING_HOST/scripts/package-plugin.sh" "$SLUG"
else
echo "PACKAGING_HOST not found; skipping packaging audit"
fi
+87
View File
@@ -0,0 +1,87 @@
name: Release
on:
push:
tags:
- 'v*'
jobs:
test-gate:
name: Test Gate (lint + phpcs + phpstan + unit + integration)
runs-on: ubuntu-latest
# Host-mode runner: no service containers. Uses the host MariaDB, same as
# the Tests workflow.
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: PHP Lint
run: |
find . -name "*.php" \
! -path "./vendor/*" \
! -path "./tests/*" \
-print0 | xargs -0 -n1 php -l
echo "PHP syntax OK"
- name: PHPCS
run: vendor/bin/phpcs --standard=phpcs.xml --report=checkstyle -q .
- name: PHPStan
run: vendor/bin/phpstan analyse --no-progress --error-format=github
- name: Unit Tests
run: php vendor/bin/phpunit --configuration phpunit.xml --testdox
- name: Integration Tests
env:
TMDO_TEST_DB_HOST: 127.0.0.1
TMDO_TEST_DB_USER: dbo
TMDO_TEST_DB_PASS: ${{ secrets.TMDO_TEST_DB_PASS }}
TMDO_TEST_DB_NAME: wp_wpdo_test
run: php vendor/bin/phpunit --configuration phpunit-integration.xml --testdox
release:
needs: [test-gate]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build ZIP
run: bash scripts/ci-package.sh
- name: Create Gitea Release
env:
GITEA_TOKEN: ${{ secrets.RELEASE_TOKEN }}
GITEA_URL: ${{ vars.RELEASE_GITEA_URL }}
run: |
set -euo pipefail
VERSION="${{ gitea.ref_name }}"
ZIP=$(ls dist/*.zip | head -1)
ZIP_NAME=$(basename "$ZIP")
MD5=$(md5sum "$ZIP" | awk '{print $1}')
# Create the release
RELEASE_ID=$(curl -s -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
"${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/releases" \
-d "{
\"tag_name\": \"${VERSION}\",
\"name\": \"${VERSION}\",
\"body\": \"MD5: \`${MD5}\`\",
\"draft\": false,
\"prerelease\": false
}" | grep -o '"id":[0-9]*' | head -1 | grep -o '[0-9]*')
# Upload ZIP asset
curl -s -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/zip" \
"${GITEA_URL}/api/v1/repos/${{ gitea.repository }}/releases/${RELEASE_ID}/assets?name=${ZIP_NAME}" \
--data-binary "@${ZIP}"
echo "Released ${VERSION} — asset: ${ZIP_NAME} (MD5: ${MD5})"
+111
View File
@@ -0,0 +1,111 @@
name: Tests
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
unit:
name: Unit Tests
runs-on: ubuntu-latest
# Host-mode gitea runner (label `ubuntu-latest:host`) uses the host PHP
# toolchain (currently 8.3). `shivammathur/setup-php` cannot provision
# alternate PHP versions in host mode, so there is no 8.1/8.2/8.3 matrix.
# (Restore one if the runner ever moves to container mode.)
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run unit tests
run: php vendor/bin/phpunit --configuration phpunit.xml --testdox
integration:
name: Integration Tests
runs-on: ubuntu-latest
# Host-mode runner: service containers are NOT started, so connect to the
# host MariaDB at 127.0.0.1:3306 directly. The password comes from the repo
# secret TMDO_TEST_DB_PASS (test DB `wp_wpdo_test` and user `dbo` already
# exist on the host). The bootstrap also accepts the legacy WPDO_TEST_DB_*
# names, so an existing secret of either name works.
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
# Preflight: a DB outage or a rotated secret would otherwise surface as an
# opaque PHPUnit bootstrap error. Fail fast with an INFRA-vs-test
# distinction so a red integration job is diagnosable.
- name: DB preflight (host MariaDB reachable?)
env:
TMDO_TEST_DB_HOST: 127.0.0.1
TMDO_TEST_DB_USER: dbo
TMDO_TEST_DB_PASS: ${{ secrets.TMDO_TEST_DB_PASS }}
TMDO_TEST_DB_NAME: wp_wpdo_test
run: |
php -r '
mysqli_report(MYSQLI_REPORT_OFF);
$c = @mysqli_connect(getenv("TMDO_TEST_DB_HOST"), getenv("TMDO_TEST_DB_USER"), getenv("TMDO_TEST_DB_PASS"), getenv("TMDO_TEST_DB_NAME"), 3306);
if (!$c) {
fwrite(STDERR, "::error::Integration DB unreachable at " . getenv("TMDO_TEST_DB_HOST") . ":3306 db=" . getenv("TMDO_TEST_DB_NAME") . " user=" . getenv("TMDO_TEST_DB_USER") . " — host MariaDB down or TMDO_TEST_DB_PASS secret stale/rotated. This is an INFRA failure, not a test failure: " . mysqli_connect_error() . "\n");
exit(1);
}
echo "DB preflight OK: connected to " . getenv("TMDO_TEST_DB_NAME") . " on " . getenv("TMDO_TEST_DB_HOST") . "\n";
'
- name: Run integration tests
env:
TMDO_TEST_DB_HOST: 127.0.0.1
TMDO_TEST_DB_USER: dbo
TMDO_TEST_DB_PASS: ${{ secrets.TMDO_TEST_DB_PASS }}
TMDO_TEST_DB_NAME: wp_wpdo_test
run: php vendor/bin/phpunit --configuration phpunit-integration.xml --testdox
lint:
name: PHP Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check PHP syntax
run: |
find . -name "*.php" \
! -path "./vendor/*" \
! -path "./tests/*" \
-print0 | xargs -0 -n1 php -l
echo "PHP syntax OK"
phpcs:
name: PHPCS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPCS
run: vendor/bin/phpcs --standard=phpcs.xml --report=checkstyle -q .
phpstan:
name: PHPStan
runs-on: ubuntu-latest
# A never ran static analysis in CI; the baseline is committed, so new code
# is checked at level 6 while existing debt stays silent.
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run PHPStan (level 6, baselined)
run: vendor/bin/phpstan analyse --no-progress --error-format=github
+1
View File
@@ -14,3 +14,4 @@ Thumbs.db
.playwright-mcp/ .playwright-mcp/
.claude/ .claude/
dist/ dist/
.phpcs-cache
+34
View File
@@ -0,0 +1,34 @@
<?php
/**
* PHPStan bootstrap stubs — plugin constants defined at runtime.
*
* PHPStan cannot see define()'d constants, so it reports "undefined constant"
* for every one of them. Stubbing them here keeps level 6 signal-to-noise high.
*
* TMDO_IS_SQLITE / TMDO_IS_MYSQL (and their WPDO_ aliases) are intentionally
* NOT stubbed to avoid literal-narrowing "always true/false" false positives
* on runtime-dynamic values.
*
* @package TMDO
*/
declare(strict_types=1);
define( 'TMDO_VERSION', '0.0.0' );
define( 'TMDO_DB_VERSION', '0.0.0' );
define( 'TMDO_PATH', '/' );
define( 'TMDO_URL', 'https://example.test/wp-content/plugins/2meet-data-optimizer/' );
define( 'TMDO_FILE', '/2meet-data-optimizer.php' );
define( 'TMDO_TABLE_PREFIX', 'wpdo_' );
define( 'TMDO_CACHE_GROUP', 'wpdo' );
define( 'TMDO_MIN_PHP', '8.1' );
define( 'TMDO_MIN_WP', '6.0' );
// Back-compat aliases exposed by class-tmdo-back-compat.php.
define( 'WPDO_VERSION', '0.0.0' );
define( 'WPDO_DB_VERSION', '0.0.0' );
define( 'WPDO_PLUGIN_DIR', '/' );
define( 'WPDO_PLUGIN_URL', 'https://example.test/wp-content/plugins/2meet-data-optimizer/' );
define( 'WPDO_PLUGIN_FILE', '/2meet-data-optimizer.php' );
define( 'WPDO_TABLE_PREFIX', 'wpdo_' );
define( 'WPDO_CACHE_GROUP', 'wpdo' );
+2
View File
@@ -19,6 +19,8 @@
* @package TMDO * @package TMDO
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+54 -4
View File
@@ -207,10 +207,59 @@
| 2 | DDL 與並發 B1B4warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment | ✅ 2026-07-31 | | 2 | DDL 與並發 B1B4warm UNIQUE KEY → Zone_Cold save_patch → Zone_Warm increment | ✅ 2026-07-31 |
| 3 | 架構回填(Zone_Router + Routing_Predicate13 個 Migration Phase 類別) | ✅ 2026-07-31 | | 3 | 架構回填(Zone_Router + Routing_Predicate13 個 Migration Phase 類別) | ✅ 2026-07-31 |
| 4 | 相容層 E1E7(雙向 hook 橋、57 個 AddOn alias、38 個 CLI 子指令、選單 slug | ✅ 2026-07-31 | | 4 | 相容層 E1E7(雙向 hook 橋、57 個 AddOn alias、38 個 CLI 子指令、選單 slug | ✅ 2026-07-31 |
| 5 | AddOn 同步 F1F5Standard_Post_Interceptor、HP detector v3.4.5、WC | | | 5 | AddOn 同步 F1F5Standard_Post_Interceptor、HP detector v3.4.5、WC | ✅ 2026-07-31 |
| 6 | 功能與診斷 PR-Gcrypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | | | 6 | 功能與診斷 PR-Gcrypto 健檢、doctor_callback ABI、15 個 usermeta 欄位…) | ✅ 2026-07-31**Settings 分區 AJAX 未做**,見下) |
| 7 | 全域清理與 CIstrict_types、phpcs.xml、phpstan + baseline、gitea workflows | | | 7 | 全域清理與 CIstrict_types、phpcs.xml、phpstan + baseline、gitea workflows | 🔶 strict_types / PHPCS / PHPStan / 3 個 workflow / ci-package.sh ✅;**測試補齊(剩 36 檔,多為 HP/WC)、文件移植未做** |
| 退休 | 兩站台切到 B、移除 A、B 升 1.0.0 | | | 退休 | 兩站台切到 B、移除 A、B 升 1.0.0 | 🔶 dev30 已切換並驗證通過;dev 未切、A 未移除、版本未升 |
### dev30 實機驗證結果(2026-07-31
環境:`2meet-brandcards` 1.8.3 / `2meet-hub-core` 1.16.0 / `2meet-spoke-sso` 1.15.0 同時啟用;HivePress / WooCommerce 未安裝,故只啟用核心 + hub-addon + spoke-addon。
| 項目 | A v3.0.0(切換前) | B v0.1.0(切換後) |
|---|---|---|
| `doctor` | 33 個 `[OK]` + 15 個 WC 表 MISSING 警告 | **49 個 `[OK]`、All checks passed** |
| 姊妹外掛自訂表 | 36 張 OK | 36 張 OK(含 brandcards 的 `doctor_callback` 回傳訊息) |
| 新健檢 | 無 | `Backup dir blocked (HTTP 404)``Crypto key derivable` 皆 OK |
逐項確認:
- **alias**15 個核心類別 + trait + interface + `wpdo_run()` + `WPDO_VERSION` 全部可用
- **CLI**`wp tmdo bridge-status / crypto-status / mode-audit``wp wpdo *` 兩條路徑都通(38 個子指令)
- **anti-EAV 寫入**`WPDO_API::set_entity()``wp_wpdo_user_sso.known_login_ips` 寫入成功(A14 生效)
- **audit**`wp_wpdo_audit``group_name` / `action` / `trace_id`UUIDv4)皆有值(A11/A12 生效)
- **REST allowlist**:註冊 `show_in_rest => false` 的欄位不出現在 `get_rest_visible_hot_columns()`A5/A6 生效)
- **doctor_callback ABI 變更**brandcards 既有 callback 在 1 參數簽章下仍正常
- 前台 HTTP 200`_load_textdomain_just_in_time` notice 僅出現在 `wp plugin activate` 當下(啟用鉤子早於 `init`),一般請求與前台皆無
**實機才抓到的 fatal**`TMDO_Logger::trace_id()` 在 B 提煉時遺漏,而 `Audit_Logger::write_row()` 會呼叫它。A12 把 Audit_Logger 掛上後,任何一次受管 meta 寫入都會 fatal。PHPUnit 沒有覆蓋 audit 寫入路徑 → 這類「跨模組才會踩到」的缺口只有實機能發現。
### 尚未完成(follow-up
1. **Settings 分區 AJAX 儲存**A v3.0.2):`ajax_save_settings_section()` + 7 個 `save_section_*()` + `admin/assets/wpdo-settings.js`。B 目前是一次存全部的 inline `update_option` 巨塊,功能可用,屬 UX 改善。其中 `save_section_hp_transient` / `save_section_wc_term_count` 對應 AddOn 已移除的設定,移植時要拆掉或加 `class_exists` 守衛。
2. ~~CI workflow~~ ✅ 三個檔已建,但 **B 沒有 git remote**,要推上 gitea 才會實際執行;推上去後還需設 repo secret `TMDO_TEST_DB_PASS`、var `RELEASE_GITEA_URL`、secret `RELEASE_TOKEN`,並開 main branch protection。11 個 AddOn 的 CI 仍未建。
3. ~~`scripts/ci-package.sh`~~ ✅(委派共用 `package-plugin.sh`,實測 10 項終檢全 PASS
4. ~~補測試檔~~ ✅ 核心補 `HookBusIntegrationTest`14+ 新寫 `AuditLoggerIntegrationTest`4);HP AddOn 建 phpunit 基建並移植 25 檔(145 tests);WC AddOn 建基建並移植 1 檔(10 tests)。11 個 AddOn 皆有 CI workflowHP/WC 跑 lint+unit,其餘 9 個薄註冊層只跑 lint)。
- 仍缺:`TermCommentBackfillTest`require HP AddOn 的 term-comment-fields,可移入 HP AddOn 套件)、`ListingStatsTest`(同上)、HP/WC 的 integration 測試(`HivepressIntegrationTest` ×3、`WCTermCountFilterTest``ListingMetaInterceptorTest`)——這些需要 AddOn 端的 integration bootstrap。
### 全家族測試現況(2026-07-31
| 套件 | 結果 |
|---|---|
| 核心 unit | 451 tests / 889 assertions |
| 核心 integration | 416 tests / 1165 assertions |
| hivepress-addon unit | 145 tests / 357 assertions |
| woocommerce-addon unit | 10 tests / 33 assertions |
AddOn 測試 bootstrap 直接 `require` 核心 plugin 的 `tests/bootstrap.php`(避免複製 ~700 行 WP stub),因此 **AddOn 的 CI job 必須同時 checkout 核心 plugin**workflow 已如此設定。
5. **文件移植**`readme.txt``CONTEXT.md``docs/`ENTITY_ADAPTER_COOKBOOK、INTEGRATION_PATTERN_DECISION、2 篇 ADR)。
6. **實機驗證與退休切換**:兩站台目前仍跑 Adev = v3.4.6、dev30 = v3.0.0),B 家族 12 個外掛全 inactive,尚未做過 `wp tmdo doctor` 實機驗證。
### ABI / 行為變更(升級須知)
- `doctor_callback` 由 3 參數改為 1 參數(表名)——AddOn 若註冊過該 callback 需同步。
- `wpdo_capture_before_value` 預設 `true``false`,每次受管寫入省一次 DB read;需要 `value_before` 的消費者(audit log)要 `add_filter( 'wpdo_capture_before_value', '__return_true' )`
- `wpdo_allow_mass_column_clear` 現為 opt-in`delete_all=true` 的整欄清空預設被拒。
- 選單 slug 由 `2meet-data-optimizer` 改回 `wp-data-optimizer`
### Lessons learnedbackport ### Lessons learnedbackport
@@ -218,6 +267,7 @@
- `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 要刪掉重複的那一份。 - `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 踩過同一個坑)。 - `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` - integration 測試需要 `TMDO_TEST_DB_PASS`(或 `WPDO_TEST_DB_PASS`)環境變數,DB 為本機 `wp_wpdo_test`
- **跑完 `scripts/ci-package.sh``package-plugin.sh` 後要重跑 `composer install`**:打包流程內含 `composer install --no-dev`,會把 `vendor/bin/{phpunit,phpcs,phpstan}` 移掉,之後任何測試指令都會 "No such file or directory"。
- **A 不是照抄對象,有兩處自身缺陷不可照搬**: - **A 不是照抄對象,有兩處自身缺陷不可照搬**:
1. `A/includes/engine/class-wpdo-hook-bus.php:511,522` 傳 3 個 string 給 `Logger::warning( string $event, array $context )` → A 有 `strict_types`mass-clear 路徑必炸。B 用正確簽章。 1. `A/includes/engine/class-wpdo-hook-bus.php:511,522` 傳 3 個 string 給 `Logger::warning( string $event, array $context )` → A 有 `strict_types`mass-clear 路徑必炸。B 用正確簽章。
2. `A/admin/class-wpdo-dashboard-widget.php:191``wpdo_postmeta_cleanup` 仍是 `wp_nonce_url` GET 連結,但其 handler 已只收 POST → 該按鈕在 A 是壞的。B 改成 form。 2. `A/admin/class-wpdo-dashboard-widget.php:191``wpdo_postmeta_cleanup` 仍是 `wp_nonce_url` GET 連結,但其 handler 已只收 POST → 該按鈕在 A 是壞的。B 改成 form。
+7 -4
View File
@@ -1,11 +1,14 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: native meta queries for management dashboard
/** /**
* WP Data Optimizer admin UI class. * WP Data Optimizer admin UI class.
* *
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: native meta queries for management dashboard
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -3107,9 +3110,9 @@ wpdo.getListings({ per_page: 3 }).then(r => console.log(r));'
); );
echo '</tr></thead><tbody>'; echo '</tr></thead><tbody>';
foreach ( $enable as $module => $r ) { foreach ( $enable as $module => $r ) {
$conf = (float) $r['confidence']; $conf = (float) $r['confidence'];
$bar_w = (int) round( $conf * 100 ); $bar_w = (int) round( $conf * 100 );
$color = $conf >= 0.7 ? '#46b450' : ( $conf >= 0.5 ? '#dba617' : '#c3c4c7' ); $color = $conf >= 0.7 ? '#46b450' : ( $conf >= 0.5 ? '#dba617' : '#c3c4c7' );
printf( printf(
'<tr><td><code>%s</code></td><td><div style="background:#f0f0f1;border-radius:3px;width:80px;height:18px;position:relative;"><div style="background:%s;width:%d%%;height:100%%;border-radius:3px;"></div><span style="position:absolute;inset:0;text-align:center;font-size:11px;line-height:18px;">%s</span></div></td>', '<tr><td><code>%s</code></td><td><div style="background:#f0f0f1;border-radius:3px;width:80px;height:18px;position:relative;"><div style="background:%s;width:%d%%;height:100%%;border-radius:3px;"></div><span style="position:absolute;inset:0;text-align:center;font-size:11px;line-height:18px;">%s</span></div></td>',
esc_html( $module ), esc_html( $module ),
+5 -2
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: native postmeta count for dashboard widget
/** /**
* TMDO_Dashboard_Widget — wp-admin home dashboard widget (v2.4.0 M9). * TMDO_Dashboard_Widget — wp-admin home dashboard widget (v2.4.0 M9).
* *
@@ -15,6 +14,10 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: native postmeta count for dashboard widget
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -58,7 +61,7 @@ class TMDO_Dashboard_Widget {
* @return void * @return void
*/ */
public static function render(): void { public static function render(): void {
$page_url = admin_url( 'tools.php?page=wp-data-optimizer' ); $page_url = admin_url( 'tools.php?page=wp-data-optimizer' );
$bridge_url = add_query_arg( 'tab', 'entity-bridge', $page_url ); $bridge_url = add_query_arg( 'tab', 'entity-bridge', $page_url );
$status = self::compute_status(); $status = self::compute_status();
+2
View File
@@ -15,6 +15,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -14,6 +14,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: postmeta inventory for setup wizard
/** /**
* TMDO_Setup_Wizard — First-run onboarding wizard (v2.3.0 M5). * TMDO_Setup_Wizard — First-run onboarding wizard (v2.3.0 M5).
* *
@@ -20,6 +19,10 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: postmeta inventory for setup wizard
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: stress test SQL example display
/** /**
* Comment Stress Test template (v2.13.1). * Comment Stress Test template (v2.13.1).
* *
@@ -16,6 +15,10 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: stress test SQL example display
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -10,6 +10,8 @@
* @since 2.8.0 * @since 2.8.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -13,6 +13,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -16,6 +16,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: stress test SQL example display
/** /**
* Term Stress Test template (v2.13.0). * Term Stress Test template (v2.13.0).
* *
@@ -16,6 +15,10 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform admin UI: stress test SQL example display
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform CLI inspector tool: raw meta queries needed for diagnostics
/** /**
* TMDO_CLI_Member — Member flat-table CLI subcommands. * TMDO_CLI_Member — Member flat-table CLI subcommands.
* *
@@ -17,6 +16,10 @@
* @since 2.5.5 * @since 2.5.5
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform CLI inspector tool: raw meta queries needed for diagnostics
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform CLI inspector tool: raw meta queries needed for diagnostics
/** /**
* TMDO_CLI_Post — Post entity CLI subcommands (v2.9.0+). * TMDO_CLI_Post — Post entity CLI subcommands (v2.9.0+).
* *
@@ -16,6 +15,10 @@
* @since 2.9.0 * @since 2.9.0
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform CLI inspector tool: raw meta queries needed for diagnostics
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform CLI inspector tool: raw meta queries needed for diagnostics
/** /**
* TMDO_CLI_Term_Comment — Term + Comment entity CLI subcommands (v2.12.0+). * TMDO_CLI_Term_Comment — Term + Comment entity CLI subcommands (v2.12.0+).
* *
@@ -19,6 +18,10 @@
* @since 2.12.0 * @since 2.12.0
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform CLI inspector tool: raw meta queries needed for diagnostics
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -19,6 +19,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -8,6 +8,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform diagnostic: raw meta inspection for FSM state advisor
/** /**
* TMDO_FSM_Advisor — Recommends the next FSM state per module (v2.4.0 M12). * TMDO_FSM_Advisor — Recommends the next FSM state per module (v2.4.0 M12).
* *
@@ -22,6 +21,10 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform diagnostic: raw meta inspection for FSM state advisor
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -20,6 +20,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -18,6 +18,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -17,6 +17,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -14,6 +14,8 @@
* @since 0.1.0 * @since 0.1.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -14,6 +14,8 @@
* @since 0.1.0 * @since 0.1.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -19,6 +19,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+115 -113
View File
@@ -9,127 +9,129 @@
* @package TMDO * @package TMDO
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
// ── 公開合約類別(Phase 1 凍結,不可移除)───────────────────────────── // ── 公開合約類別(Phase 1 凍結,不可移除)─────────────────────────────
$tmdo_class_aliases = array( $tmdo_class_aliases = array(
'TMDO_API' => 'WPDO_API', 'TMDO_API' => 'WPDO_API',
'TMDO_Schema_Registry' => 'WPDO_Schema_Registry', 'TMDO_Schema_Registry' => 'WPDO_Schema_Registry',
'TMDO_Entity_Registry' => 'WPDO_Entity_Registry', 'TMDO_Entity_Registry' => 'WPDO_Entity_Registry',
'TMDO_Custom_Table_Registry' => 'WPDO_Custom_Table_Registry', 'TMDO_Custom_Table_Registry' => 'WPDO_Custom_Table_Registry',
'TMDO_Feature_Flags' => 'WPDO_Feature_Flags', 'TMDO_Feature_Flags' => 'WPDO_Feature_Flags',
'TMDO_DB' => 'WPDO_DB', 'TMDO_DB' => 'WPDO_DB',
'TMDO_Crypto' => 'WPDO_Crypto', 'TMDO_Crypto' => 'WPDO_Crypto',
'TMDO_Logger' => 'WPDO_Logger', 'TMDO_Logger' => 'WPDO_Logger',
'TMDO_Capability' => 'WPDO_Capability', 'TMDO_Capability' => 'WPDO_Capability',
'TMDO_Safe_Unserialize' => 'WPDO_Safe_Unserialize', 'TMDO_Safe_Unserialize' => 'WPDO_Safe_Unserialize',
// Engine / Migration / Adapterssecond-tier,部分 sister plugin 已直接呼叫) // Engine / Migration / Adapterssecond-tier,部分 sister plugin 已直接呼叫)
'TMDO_Hook_Bus' => 'WPDO_Hook_Bus', 'TMDO_Hook_Bus' => 'WPDO_Hook_Bus',
'TMDO_Mode_Manager' => 'WPDO_Mode_Manager', 'TMDO_Mode_Manager' => 'WPDO_Mode_Manager',
'TMDO_Migration_Engine' => 'WPDO_Migration_Engine', 'TMDO_Migration_Engine' => 'WPDO_Migration_Engine',
'TMDO_Migration_Orchestrator' => 'WPDO_Migration_Orchestrator', 'TMDO_Migration_Orchestrator' => 'WPDO_Migration_Orchestrator',
'TMDO_Entity_Migration_Engine' => 'WPDO_Entity_Migration_Engine', 'TMDO_Entity_Migration_Engine' => 'WPDO_Entity_Migration_Engine',
'TMDO_Entity_Health' => 'WPDO_Entity_Health', 'TMDO_Entity_Health' => 'WPDO_Entity_Health',
'TMDO_Schema_Manager' => 'WPDO_Schema_Manager', 'TMDO_Schema_Manager' => 'WPDO_Schema_Manager',
'TMDO_Sync_Bridge' => 'WPDO_Sync_Bridge', 'TMDO_Sync_Bridge' => 'WPDO_Sync_Bridge',
'TMDO_Query_Router' => 'WPDO_Query_Router', 'TMDO_Query_Router' => 'WPDO_Query_Router',
'TMDO_Post_Query_Router' => 'WPDO_Post_Query_Router', 'TMDO_Post_Query_Router' => 'WPDO_Post_Query_Router',
'TMDO_Hook_Bus_Bridge' => 'WPDO_Hook_Bus_Bridge', 'TMDO_Hook_Bus_Bridge' => 'WPDO_Hook_Bus_Bridge',
'TMDO_Conflict_Monitor' => 'WPDO_Conflict_Monitor', 'TMDO_Conflict_Monitor' => 'WPDO_Conflict_Monitor',
'TMDO_Compatibility' => 'WPDO_Compatibility', 'TMDO_Compatibility' => 'WPDO_Compatibility',
'TMDO_Installer' => 'WPDO_Installer', 'TMDO_Installer' => 'WPDO_Installer',
'TMDO_Cache_Layer' => 'WPDO_Cache_Layer', 'TMDO_Cache_Layer' => 'WPDO_Cache_Layer',
'TMDO_Zone_Classifier' => 'WPDO_Zone_Classifier', 'TMDO_Zone_Classifier' => 'WPDO_Zone_Classifier',
'TMDO_Core' => 'WPDO_Core', 'TMDO_Core' => 'WPDO_Core',
'TMDO_REST_API' => 'WPDO_REST_API', 'TMDO_REST_API' => 'WPDO_REST_API',
'TMDO_Snapshot_Manager' => 'WPDO_Snapshot_Manager', 'TMDO_Snapshot_Manager' => 'WPDO_Snapshot_Manager',
'TMDO_Snapshot_Writer' => 'WPDO_Snapshot_Writer', 'TMDO_Snapshot_Writer' => 'WPDO_Snapshot_Writer',
'TMDO_Snapshot_Reader' => 'WPDO_Snapshot_Reader', 'TMDO_Snapshot_Reader' => 'WPDO_Snapshot_Reader',
'TMDO_Snapshot_Pruner' => 'WPDO_Snapshot_Pruner', 'TMDO_Snapshot_Pruner' => 'WPDO_Snapshot_Pruner',
'TMDO_FSM_Guard' => 'WPDO_FSM_Guard', 'TMDO_FSM_Guard' => 'WPDO_FSM_Guard',
'TMDO_Site_Health' => 'WPDO_Site_Health', 'TMDO_Site_Health' => 'WPDO_Site_Health',
'TMDO_Health_Cron' => 'WPDO_Health_Cron', 'TMDO_Health_Cron' => 'WPDO_Health_Cron',
'TMDO_Email_Notifier' => 'WPDO_Email_Notifier', 'TMDO_Email_Notifier' => 'WPDO_Email_Notifier',
'TMDO_Slack_Notifier' => 'WPDO_Slack_Notifier', 'TMDO_Slack_Notifier' => 'WPDO_Slack_Notifier',
'TMDO_Discord_Notifier' => 'WPDO_Discord_Notifier', 'TMDO_Discord_Notifier' => 'WPDO_Discord_Notifier',
'TMDO_Telegram_Notifier' => 'WPDO_Telegram_Notifier', 'TMDO_Telegram_Notifier' => 'WPDO_Telegram_Notifier',
'TMDO_Monthly_Summary' => 'WPDO_Monthly_Summary', 'TMDO_Monthly_Summary' => 'WPDO_Monthly_Summary',
'TMDO_Site_Metrics_Collector' => 'WPDO_Site_Metrics_Collector', 'TMDO_Site_Metrics_Collector' => 'WPDO_Site_Metrics_Collector',
'TMDO_FSM_Advisor' => 'WPDO_FSM_Advisor', 'TMDO_FSM_Advisor' => 'WPDO_FSM_Advisor',
'TMDO_Module_Detector' => 'WPDO_Module_Detector', 'TMDO_Module_Detector' => 'WPDO_Module_Detector',
'TMDO_FSM_Automator' => 'WPDO_FSM_Automator', 'TMDO_FSM_Automator' => 'WPDO_FSM_Automator',
'TMDO_Module_Rules' => 'WPDO_Module_Rules', 'TMDO_Module_Rules' => 'WPDO_Module_Rules',
'TMDO_CSV_Writer' => 'WPDO_CSV_Writer', 'TMDO_CSV_Writer' => 'WPDO_CSV_Writer',
'TMDO_Export' => 'WPDO_Export', 'TMDO_Export' => 'WPDO_Export',
'TMDO_CLI' => 'WPDO_CLI', 'TMDO_CLI' => 'WPDO_CLI',
'TMDO_CLI_V2' => 'WPDO_CLI_V2', 'TMDO_CLI_V2' => 'WPDO_CLI_V2',
'TMDO_CLI_Member' => 'WPDO_CLI_Member', 'TMDO_CLI_Member' => 'WPDO_CLI_Member',
'TMDO_CLI_Post' => 'WPDO_CLI_Post', 'TMDO_CLI_Post' => 'WPDO_CLI_Post',
'TMDO_CLI_Term_Comment' => 'WPDO_CLI_Term_Comment', 'TMDO_CLI_Term_Comment' => 'WPDO_CLI_Term_Comment',
'TMDO_Member_Fields' => 'WPDO_Member_Fields', 'TMDO_Member_Fields' => 'WPDO_Member_Fields',
'TMDO_Post_Fields' => 'WPDO_Post_Fields', 'TMDO_Post_Fields' => 'WPDO_Post_Fields',
'TMDO_Points_Manager' => 'WPDO_Points_Manager', 'TMDO_Points_Manager' => 'WPDO_Points_Manager',
'TMDO_Demo_Entity_Counter' => 'WPDO_Demo_Entity_Counter', 'TMDO_Demo_Entity_Counter' => 'WPDO_Demo_Entity_Counter',
'TMDO_Postmeta_Cleaner' => 'WPDO_Postmeta_Cleaner', 'TMDO_Postmeta_Cleaner' => 'WPDO_Postmeta_Cleaner',
'TMDO_Termmeta_Cleaner' => 'WPDO_Termmeta_Cleaner', 'TMDO_Termmeta_Cleaner' => 'WPDO_Termmeta_Cleaner',
'TMDO_Commentmeta_Cleaner' => 'WPDO_Commentmeta_Cleaner', 'TMDO_Commentmeta_Cleaner' => 'WPDO_Commentmeta_Cleaner',
'TMDO_Post_Stress_Tester' => 'WPDO_Post_Stress_Tester', 'TMDO_Post_Stress_Tester' => 'WPDO_Post_Stress_Tester',
'TMDO_User_Stress_Tester' => 'WPDO_User_Stress_Tester', 'TMDO_User_Stress_Tester' => 'WPDO_User_Stress_Tester',
'TMDO_Term_Stress_Tester' => 'WPDO_Term_Stress_Tester', 'TMDO_Term_Stress_Tester' => 'WPDO_Term_Stress_Tester',
'TMDO_Comment_Stress_Tester' => 'WPDO_Comment_Stress_Tester', 'TMDO_Comment_Stress_Tester' => 'WPDO_Comment_Stress_Tester',
'TMDO_Post_Shadow_Verifier' => 'WPDO_Post_Shadow_Verifier', 'TMDO_Post_Shadow_Verifier' => 'WPDO_Post_Shadow_Verifier',
'TMDO_Term_Comment_Shadow_Verifier' => 'WPDO_Term_Comment_Shadow_Verifier', 'TMDO_Term_Comment_Shadow_Verifier' => 'WPDO_Term_Comment_Shadow_Verifier',
'TMDO_Term_Comment_Backfill' => 'WPDO_Term_Comment_Backfill', 'TMDO_Term_Comment_Backfill' => 'WPDO_Term_Comment_Backfill',
'TMDO_Term_Comment_Misc_Bucket' => 'WPDO_Term_Comment_Misc_Bucket', 'TMDO_Term_Comment_Misc_Bucket' => 'WPDO_Term_Comment_Misc_Bucket',
'TMDO_Term_Comment_Garbage_Filter' => 'WPDO_Term_Comment_Garbage_Filter', 'TMDO_Term_Comment_Garbage_Filter' => 'WPDO_Term_Comment_Garbage_Filter',
'TMDO_Setup_Wizard' => 'WPDO_Setup_Wizard', 'TMDO_Setup_Wizard' => 'WPDO_Setup_Wizard',
'TMDO_Dashboard_Widget' => 'WPDO_Dashboard_Widget', 'TMDO_Dashboard_Widget' => 'WPDO_Dashboard_Widget',
'TMDO_Help_Tabs' => 'WPDO_Help_Tabs', 'TMDO_Help_Tabs' => 'WPDO_Help_Tabs',
'TMDO_Admin' => 'WPDO_Admin', 'TMDO_Admin' => 'WPDO_Admin',
'TMDO_V2_Upgrader' => 'WPDO_V2_Upgrader', 'TMDO_V2_Upgrader' => 'WPDO_V2_Upgrader',
'TMDO_SQLite_Compat' => 'WPDO_SQLite_Compat', 'TMDO_SQLite_Compat' => 'WPDO_SQLite_Compat',
'TMDO_Type_Caster' => 'WPDO_Type_Caster', 'TMDO_Type_Caster' => 'WPDO_Type_Caster',
'TMDO_Audit_Logger' => 'WPDO_Audit_Logger', 'TMDO_Audit_Logger' => 'WPDO_Audit_Logger',
'TMDO_Shadow_Diff_Logger' => 'WPDO_Shadow_Diff_Logger', 'TMDO_Shadow_Diff_Logger' => 'WPDO_Shadow_Diff_Logger',
'TMDO_Conflict_Detector' => 'WPDO_Conflict_Detector', 'TMDO_Conflict_Detector' => 'WPDO_Conflict_Detector',
'TMDO_Cache_Orchestrator' => 'WPDO_Cache_Orchestrator', 'TMDO_Cache_Orchestrator' => 'WPDO_Cache_Orchestrator',
'TMDO_Query_Compiler' => 'WPDO_Query_Compiler', 'TMDO_Query_Compiler' => 'WPDO_Query_Compiler',
'TMDO_Auto_Promoter' => 'WPDO_Auto_Promoter', 'TMDO_Auto_Promoter' => 'WPDO_Auto_Promoter',
'TMDO_Adapter_Post' => 'WPDO_Adapter_Post', 'TMDO_Adapter_Post' => 'WPDO_Adapter_Post',
'TMDO_Adapter_User' => 'WPDO_Adapter_User', 'TMDO_Adapter_User' => 'WPDO_Adapter_User',
'TMDO_Adapter_Term' => 'WPDO_Adapter_Term', 'TMDO_Adapter_Term' => 'WPDO_Adapter_Term',
'TMDO_Adapter_Comment' => 'WPDO_Adapter_Comment', 'TMDO_Adapter_Comment' => 'WPDO_Adapter_Comment',
'TMDO_Options_Manager' => 'WPDO_Options_Manager', 'TMDO_Options_Manager' => 'WPDO_Options_Manager',
'TMDO_Hot_Migration' => 'WPDO_Hot_Migration', 'TMDO_Hot_Migration' => 'WPDO_Hot_Migration',
'TMDO_Warm_Migration' => 'WPDO_Warm_Migration', 'TMDO_Warm_Migration' => 'WPDO_Warm_Migration',
'TMDO_Cold_Migration' => 'WPDO_Cold_Migration', 'TMDO_Cold_Migration' => 'WPDO_Cold_Migration',
'TMDO_Archive_Migration' => 'WPDO_Archive_Migration', 'TMDO_Archive_Migration' => 'WPDO_Archive_Migration',
'TMDO_Migration_Base' => 'WPDO_Migration_Base', 'TMDO_Migration_Base' => 'WPDO_Migration_Base',
'TMDO_Post_Migration' => 'WPDO_Post_Migration', 'TMDO_Post_Migration' => 'WPDO_Post_Migration',
'TMDO_Zone_Hot' => 'WPDO_Zone_Hot', 'TMDO_Zone_Hot' => 'WPDO_Zone_Hot',
'TMDO_Zone_Warm' => 'WPDO_Zone_Warm', 'TMDO_Zone_Warm' => 'WPDO_Zone_Warm',
'TMDO_Zone_Cold' => 'WPDO_Zone_Cold', 'TMDO_Zone_Cold' => 'WPDO_Zone_Cold',
'TMDO_Zone_Router' => 'WPDO_Zone_Router', 'TMDO_Zone_Router' => 'WPDO_Zone_Router',
'TMDO_Routing_Predicate' => 'WPDO_Routing_Predicate', 'TMDO_Routing_Predicate' => 'WPDO_Routing_Predicate',
'TMDO_Migration_Phase_Base' => 'WPDO_Migration_Phase_Base', 'TMDO_Migration_Phase_Base' => 'WPDO_Migration_Phase_Base',
'TMDO_Phase_Diagnose' => 'WPDO_Phase_Diagnose', 'TMDO_Phase_Diagnose' => 'WPDO_Phase_Diagnose',
'TMDO_Phase_Backup' => 'WPDO_Phase_Backup', 'TMDO_Phase_Backup' => 'WPDO_Phase_Backup',
'TMDO_Phase_Demote' => 'WPDO_Phase_Demote', 'TMDO_Phase_Demote' => 'WPDO_Phase_Demote',
'TMDO_Phase_Install_Schema' => 'WPDO_Phase_Install_Schema', 'TMDO_Phase_Install_Schema' => 'WPDO_Phase_Install_Schema',
'TMDO_Phase_Backfill_Bulk' => 'WPDO_Phase_Backfill_Bulk', 'TMDO_Phase_Backfill_Bulk' => 'WPDO_Phase_Backfill_Bulk',
'TMDO_Phase_Backfill_Unserialize' => 'WPDO_Phase_Backfill_Unserialize', 'TMDO_Phase_Backfill_Unserialize' => 'WPDO_Phase_Backfill_Unserialize',
'TMDO_Phase_Promote_Shadow' => 'WPDO_Phase_Promote_Shadow', 'TMDO_Phase_Promote_Shadow' => 'WPDO_Phase_Promote_Shadow',
'TMDO_Phase_Verify_Sample' => 'WPDO_Phase_Verify_Sample', 'TMDO_Phase_Verify_Sample' => 'WPDO_Phase_Verify_Sample',
'TMDO_Phase_Promote_Aeav' => 'WPDO_Phase_Promote_Aeav', 'TMDO_Phase_Promote_Aeav' => 'WPDO_Phase_Promote_Aeav',
'TMDO_Phase_Cleanup' => 'WPDO_Phase_Cleanup', 'TMDO_Phase_Cleanup' => 'WPDO_Phase_Cleanup',
'TMDO_Phase_Completed' => 'WPDO_Phase_Completed', 'TMDO_Phase_Completed' => 'WPDO_Phase_Completed',
'TMDO_Zone_Archive' => 'WPDO_Zone_Archive', 'TMDO_Zone_Archive' => 'WPDO_Zone_Archive',
'TMDO_Interceptor_Base' => 'WPDO_Interceptor_Base', 'TMDO_Interceptor_Base' => 'WPDO_Interceptor_Base',
'TMDO_Standard_Post_Interceptor' => 'WPDO_Standard_Post_Interceptor', 'TMDO_Standard_Post_Interceptor' => 'WPDO_Standard_Post_Interceptor',
'TMDO_Query_Interceptor_Base' => 'WPDO_Query_Interceptor_Base', 'TMDO_Query_Interceptor_Base' => 'WPDO_Query_Interceptor_Base',
'TMDO_Abstract_Notifier' => 'WPDO_Abstract_Notifier', 'TMDO_Abstract_Notifier' => 'WPDO_Abstract_Notifier',
); );
foreach ( $tmdo_class_aliases as $tmdo_class => $wpdo_alias ) { foreach ( $tmdo_class_aliases as $tmdo_class => $wpdo_alias ) {
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -20,6 +20,8 @@
* @since 2.14.0 * @since 2.14.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
/** /**
* TMDO_Comment_Stress_Tester — Async stress fixture generator for comment entity (v2.13.1). * TMDO_Comment_Stress_Tester — Async stress fixture generator for comment entity (v2.13.1).
* *
@@ -21,6 +20,10 @@
* @since 2.13.1 * @since 2.13.1
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -20,6 +20,8 @@
* @since 2.12.0 * @since 2.12.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -18,6 +18,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -28,6 +28,8 @@
* @since 2.15.0 (v2 GCM, AEAD authentication) * @since 2.15.0 (v2 GCM, AEAD authentication)
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -15,6 +15,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -19,6 +19,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+31
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -14,6 +16,35 @@ if ( ! defined( 'ABSPATH' ) ) {
*/ */
class TMDO_Logger { class TMDO_Logger {
/**
* Request-scoped correlation id, lazily generated.
*
* @var string|null
*/
private static ?string $trace_id = null;
/**
* Request-scoped UUIDv4 correlation id.
*
* Every audit row written during one request shares this value so a single
* update_*_meta() call can be traced across entity groups.
*
* @return string UUIDv4.
*/
public static function trace_id(): string {
if ( null === self::$trace_id ) {
try {
$bytes = random_bytes( 16 );
} catch ( \Throwable $e ) {
$bytes = pack( 'H*', md5( (string) microtime( true ) . wp_generate_password( 16, false ) ) );
}
$bytes[6] = chr( ( ord( $bytes[6] ) & 0x0f ) | 0x40 );
$bytes[8] = chr( ( ord( $bytes[8] ) & 0x3f ) | 0x80 );
self::$trace_id = vsprintf( '%s%s-%s-%s-%s-%s%s%s', str_split( bin2hex( $bytes ), 4 ) );
}
return self::$trace_id;
}
/** /**
* Log an INFO-level event (event-based signature, used by v2.0.0 engine code). * Log an INFO-level event (event-based signature, used by v2.0.0 engine code).
* *
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform shadow verifier: must read raw meta to verify zone correctness
/** /**
* TMDO_Post_Shadow_Verifier — Sample-and-compare flat vs wp_postmeta (v2.10.3). * TMDO_Post_Shadow_Verifier — Sample-and-compare flat vs wp_postmeta (v2.10.3).
* *
@@ -22,6 +21,10 @@
* @since 2.10.3 * @since 2.10.3
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform shadow verifier: must read raw meta to verify zone correctness
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
/** /**
* TMDO_Post_Stress_Tester — Bulk fixture generator for post entity migration (v2.9.4). * TMDO_Post_Stress_Tester — Bulk fixture generator for post entity migration (v2.9.4).
* *
@@ -26,6 +25,10 @@
* @since 2.9.4 * @since 2.9.4
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -19,6 +19,8 @@
* @since 2.9.0 * @since 2.9.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -15,6 +15,8 @@
* @since 0.2.0 * @since 0.2.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -19,6 +19,8 @@
* @since 2.13.3 * @since 2.13.3
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -46,6 +46,8 @@
* @since 2.12.6 * @since 2.12.6
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -22,6 +22,8 @@
* @since 2.12.5 * @since 2.12.5
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
/** /**
* TMDO_Term_Stress_Tester — Async stress fixture generator for term entity (v2.13.0). * TMDO_Term_Stress_Tester — Async stress fixture generator for term entity (v2.13.0).
* *
@@ -22,6 +21,10 @@
* @since 2.13.0 * @since 2.13.0
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -20,6 +20,8 @@
* @since 2.12.0 * @since 2.12.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+4 -1
View File
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
/** /**
* TMDO_User_Stress_Tester — User entity 壓力測試 / Benchmark 工具 * TMDO_User_Stress_Tester — User entity 壓力測試 / Benchmark 工具
* *
@@ -16,6 +15,10 @@
* @since 2.6.7 * @since 2.6.7
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform stress tester: intentional raw meta SQL for baseline comparison
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare,Generic.CodeAnalysis.UnusedFunctionParameter,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.PHP.YodaConditions,WordPress.WP.AlternativeFunctions.rand_mt_rand,WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- 測試工具:mt_rand 用於杜撰測試資料;serialize() 為 WP capabilities 標準格式 // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,WordPress.DB.PreparedSQLPlaceholders.UnfinishedPrepare,Generic.CodeAnalysis.UnusedFunctionParameter,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.PHP.YodaConditions,WordPress.WP.AlternativeFunctions.rand_mt_rand,WordPress.PHP.DiscouragedPHPFunctions.serialize_serialize -- 測試工具:mt_rand 用於杜撰測試資料;serialize() 為 WP capabilities 標準格式
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
+2
View File
@@ -21,6 +21,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
+2
View File
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -21,6 +21,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -17,6 +17,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform diagnostic: raw meta inspection for site health
/** /**
* TMDO_Site_Health — WordPress Site Health integration (v2.2.0 M3). * TMDO_Site_Health — WordPress Site Health integration (v2.2.0 M3).
* *
@@ -17,6 +16,10 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform diagnostic: raw meta inspection for site health
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -19,6 +19,8 @@
* @since 2.6.2 * @since 2.6.2
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -17,6 +17,8 @@
* @since 1.3.0 * @since 1.3.0
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -20,6 +20,8 @@
* @since 1.5.0 * @since 1.5.0
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -10,6 +10,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -19,6 +19,8 @@
* @since 1.1.2 * @since 1.1.2
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -14,6 +14,8 @@
* @since 2.6.6 * @since 2.6.6
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions -- inherits engine coding standard. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions -- inherits engine coding standard.
defined( 'ABSPATH' ) || exit; defined( 'ABSPATH' ) || exit;
@@ -14,6 +14,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -10,6 +10,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
+2
View File
@@ -10,6 +10,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -31,6 +31,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -10,6 +10,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -11,6 +11,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -16,6 +16,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -11,6 +11,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled. // phpcs:disable Squiz.Commenting,Generic.Commenting,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.DB.PreparedSQLPlaceholders.ReplacementsWrongNumber,Generic.CodeAnalysis.UnusedFunctionParameter,Generic.CodeAnalysis.EmptyStatement,Squiz.PHP.DisallowMultipleAssignments,Squiz.PHP.DisallowSizeFunctionsInLoops,WordPress.WP.I18n.MissingTranslatorsComment,WordPress.PHP.NoSilencedErrors,WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents,Squiz.PHP.CommentedOutCode,Universal.NamingConventions.NoReservedKeywordParameterNames,WordPress.PHP.YodaConditions,Squiz.Commenting.InlineComment.InvalidEndChar -- PR-1 ported from UAE; cleanup PR scheduled.
@@ -9,6 +9,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -20,6 +20,8 @@
* @since 2.0.0 * @since 2.0.0
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -8,6 +8,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -32,6 +32,8 @@
* @since 2.9.1 * @since 2.9.1
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -37,6 +37,8 @@
* @since 2.12.1 * @since 2.12.1
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -54,6 +54,8 @@
* @since 2.12.4 * @since 2.12.4
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -16,6 +16,8 @@
* @since 3.0.1 * @since 3.0.1
*/ */
declare(strict_types=1);
// phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Table name from TMDO_DB::table(); column validated by subclass FIELD_MAP constant. // phpcs:disable WordPress.DB.PreparedSQL.InterpolatedNotPrepared -- Table name from TMDO_DB::table(); column validated by subclass FIELD_MAP constant.
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@@ -5,6 +5,8 @@
* @package TMDO * @package TMDO
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -14,6 +14,8 @@
* @since 2.8.0 * @since 2.8.0
*/ */
declare(strict_types=1);
// phpcs:ignore WPDO.AntiEAV -- platform migration tool: WPDO v1->v2 legacy meta orchestration // phpcs:ignore WPDO.AntiEAV -- platform migration tool: WPDO v1->v2 legacy meta orchestration
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@@ -6,6 +6,8 @@
* @since 3.0.1 * @since 3.0.1
*/ */
declare(strict_types=1);
// phpcs:disable Squiz.Commenting.FunctionComment,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.PHP.YodaConditions,WordPress.Security.EscapeOutput.OutputNotEscaped -- Internal helpers; SQL composed from registry-validated identifiers; exception messages not echoed. // phpcs:disable Squiz.Commenting.FunctionComment,WordPress.DB.PreparedSQL.NotPrepared,WordPress.DB.PreparedSQL.InterpolatedNotPrepared,WordPress.PHP.YodaConditions,WordPress.Security.EscapeOutput.OutputNotEscaped -- Internal helpers; SQL composed from registry-validated identifiers; exception messages not echoed.
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
@@ -1,5 +1,4 @@
<?php <?php
// phpcs:ignore WPDO.AntiEAV -- platform migration tool: WPDO v1->v2 legacy post meta migration
/** /**
* TMDO_Post_Migration — Post entity migration core (v2.9.3). * TMDO_Post_Migration — Post entity migration core (v2.9.3).
* *
@@ -33,6 +32,10 @@
* @since 2.9.3 * @since 2.9.3
*/ */
// phpcs:ignore WPDO.AntiEAV -- platform migration tool: WPDO v1->v2 legacy post meta migration
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }
@@ -5,6 +5,8 @@
* @package WP_Data_Optimizer * @package WP_Data_Optimizer
*/ */
declare(strict_types=1);
if ( ! defined( 'ABSPATH' ) ) { if ( ! defined( 'ABSPATH' ) ) {
exit; exit;
} }

Some files were not shown because too many files have changed in this diff Show More