PHP 8 API 搬移批次
最後更新:2026-08-10
現在從哪裡開始
- 目前執行批次是 B001:評價、評價標籤與回覆。這批 5 組 API 都已有 PHP 8 程式,現在要完成 Staging QA 與切流條件,不是再寫一套 endpoint。
- 下一個具體動作是補完
quote_feedback_tags/index的x-php-env證據,再測quote_feedbacks/sent,最後測quote_feedback_comments/save/delete的 DB side effect。 - B001 完成後才進 B002「分類樹與子分類」。B002 的
get_category_map與pro_selection_list已於 2026-08-10 補完 PHP 8 程式與本地測試,但兩者都是低流量,後者更只有一次 4xx、疑似未使用;目前應優先處理唯一尚缺且有明顯流量的GET /quote_category_groups/meta/{id}.json。 - 這份文件是工程規劃與批次狀態;點批次名稱會進入 QA 文件,QA 文件內再連到單支 API 測試與工程 detail。
目前範圍
資料來源是 盤點結果/2026-08-03/legacy_api_endpoint_summary_30d.csv。主要工作量只計 GET/POST/DELETE,排除 HEAD 探測與 malformed path。
| 項目 | 組數 |
|---|---|
| 尚未全部走 PHP 8 | 90 |
| 已有 PHP 8 程式,正式仍走 Legacy | 59 |
| 已有 PHP 8 程式,依 API key 條件分流 | 1 |
| 尚缺 PHP 8 程式 | 30 |
| 本文件規劃批次 | 22 |
「組數」是 HTTP method + endpoint family;同一路徑同時有 GET/POST 時會算兩組。
分批原則
- 每批以同一使用流程、caller、測試身份、side effect 與 ALB rollback 範圍為主。
- 優先處理已有 PHP 8 程式的 API;但
code_in_new=yes不代表 parity 已完成。 - 付款、登入、外部 webhook 與一般查詢不可混在同一批。
- Web caller 存在時優先做 Web;Web 沒有才查 App;兩者都沒有或屬 internal callback 才用 curl/原服務事件。
- caller 尚未核對的批次一律標
待確認,不能自行假設操作頁面。
批次總表
| 批次 | 主題 | API 組數 | 程式已有/缺少 | 30 天 calls | 建議測試入口 | 初始狀態 |
|---|---|---|---|---|---|---|
| B001 | 評價、評價標籤與回覆 | 5 | 5/0 | 29,227 | Web + curl | 第一批;待整組 Staging QA |
| B002 | 分類樹與子分類 | 6 | 5/1 | 8,278,851 | Web/App + curl | 兩支低流量 API 已補;pro_selection_list 疑似未使用;優先補 quote_category_groups/meta |
| B003 | 需求建立、修改與複製 | 4 | 4/0 | 155,157 | Web + curl | 待整組 parity/QA/切流 |
| B004 | 服務類別與計價表單 | 4 | 4/0 | 114,364 | Web + curl | 待整組 parity/QA/切流 |
| B005 | 專家服務建立與狀態 | 5 | 4/1 | 73,157 | Web + curl | 需補 add_quote_faq |
| B006 | 外部評價邀請與問卷 | 4 | 4/0 | 24,346 | Web + curl | 待 caller 與資料前置確認 |
| B007 | 報價前費用與內容 | 4 | 4/0 | 234,359 | Web/App + curl | 付款相關;高風險 |
| B008 | Narrow match 邀請 | 3 | 3/0 | 74,837 | Web/App + curl | 待整組 parity/QA/切流 |
| B009 | 聯絡專家與電話計費 | 3 | 3/0 | 29,936 | App/callback + curl | 付款、callback;高風險 |
| B010 | 案件受僱、自聘與評價狀態 | 5 | 5/0 | 132,673 | Web/App + curl | 付款/狀態/通知;高風險 |
| B011 | 案件對話與常用訊息 | 5 | 5/0 | 416,016 | Web/App + curl | 高流量;待整組 QA |
| B012 | 登入、一次登入與社群登入 | 6 | 6/0 | 252,514 | Web/App | Session/cookie;高風險 |
| B013 | 註冊與驗證 | 5 | 2/3 | 149,561 | Web/App + curl | 需專用可拋棄帳號 |
| B014 | 密碼修改與重設 | 3 | 2/1 | 28,865 | Web + curl | 需專用可拋棄帳號 |
| B015 | 推薦碼與推薦紀錄 | 2 | 2/0 | 355 | Web/App + curl | 待 caller 確認 |
| B016 | 帳號設定與刪除 | 5 | 2/3 | 1,727 | Web + curl | 刪除測試需專用帳號 |
| B017 | 方案與卡片管理 | 4 | 2/2 | 60,007 | Web/App + curl | Payment;不可使用正式卡資料 |
| B018 | Stripe 扣款與 callback | 5 | 0/5 | 1,707 | Callback + curl | Payment/internal;先查 caller |
| B019 | 郵件與推播失敗 webhook | 2 | 0/2 | 181,326 | SNS/SendGrid/Vonage | 外部 webhook;不能用一般頁面代測 |
| B020 | Legacy email/login/SMS 工具 | 3 | 0/3 | 4,506 | Internal caller | 先確認 owner、簽章與 payload |
| B021 | 免費點數活動 | 3 | 0/3 | 2,750 | Web/cron 待確認 | 先確認 caller 與 DB side effect |
| B022 | CMS/管理查詢與檢舉 | 4 | 0/4 | 25,860 | CMS/Admin 待確認 | 先確認真實 caller,避免把 bot 當功能 |
合計:90 組;已有程式 60 組,缺少程式 30 組。
批次範圍
B001 評價、評價標籤與回覆
GET /quote_feedback_tags/index、POST /quote_feedback_comments/save、GET/POST /quote_feedback_comments/delete、GET /quote_feedbacks/sent。
QA 文件:B001 評價、評價標籤與回覆。
B002 分類樹與子分類
GET /quote_category_subgenres/index、GET /quote_categories/index/type:tree、POST /quote_categories/related、GET /quote_categories/get_category_map、GET /quote_category_groups/meta、GET /quote_vendor_categories/pro_selection_list。
- 下一支需實作:
GET /quote_category_groups/meta/{id}.json,30 天 16,909 calls。 - 2026-08-10 已補程式與本地測試:
GET /quote_categories/get_category_map.json、GET /quote_vendor_categories/pro_selection_list/quote_category_id:{id}.json;30/60 天各 1 call。前者可能是 Legacy Admin 偶發使用;後者唯一流量為 4xx 且無確認 caller,標記「疑似未使用」,不列為優先 QA。 - 已有 PHP 8 程式:
quote_category_subgenres/index、quote_categories/index/type:tree、quote_categories/related;仍需各自完成 parity 與 QA,不能只因程式存在就切流。
B003 需求建立、修改與複製
POST /quote_requests/search_add、GET/POST /quote_requests/edit、POST /quote_requests/copy。
B004 服務類別與計價表單
POST /quote_service_categories/add、POST /quote_service_categories/edit、GET /quote_service_categories/pricing_form、GET /quote_services/static_fields。
B005 專家服務建立與狀態
POST /quote_services/add、POST /quote_services/edit、POST /quote_services/change_status/profile_ready、POST /quote_services/change_status/archive、POST /quote_services/add_quote_faq。
B006 外部評價邀請與問卷
GET /quote_services/external_review/link、POST /quote_services/external_review/submit、POST /quote_bids/provider_request_review、POST /quote_bids/add_consumer_survey。
B007 報價前費用與內容
GET /quote_bids/preview_quote_fee、POST /quote_bids/edit、POST /quote_bids/switch_to_manual_quote、POST /quote_bids/provider_receive_phone。
B008 Narrow match 邀請
POST /quote_bids/consumer_want_provider_quote、POST /quote_bids/provider_accept_narrow_match、GET /quote_bids/consumer_want_to_see_more_quote。
B009 聯絡專家與電話計費
POST /quote_bids/want_to_contact_provider、POST /quote_bids/want_to_contact_provider_for_call_jwt、POST /quote_bids/call_fee_jwt。
B010 案件受僱、自聘與評價狀態
GET/POST /quote_bids/change_status/hired、POST /quote_bids/change_status/rating、POST /quote_bids/change_status/reviews、POST /quote_bids/change_status/self_hire。
B011 案件對話與常用訊息
GET/POST /messages/quote_conversation、POST /user_can_messages/add、POST /user_can_messages/edit、POST /user_can_messages/delete。
B012 登入、一次登入與社群登入
GET/POST /users/login、GET/POST /users/login_once、GET /users/logout、POST /users/connect_social。
B013 註冊與驗證
POST /users/sign_up、POST /users/verify、POST /users/validate_user、POST /users/send_otp_to_phone_by_email、GET /users/register。
B014 密碼修改與重設
POST /users/forgot_password、POST /users/reset_password、POST /users/change_password。
B015 推薦碼與推薦紀錄
POST /users/refer、GET /users/referrals。
B016 帳號設定與刪除
POST /users/delete、POST /users/update_auto_refill、GET /user_profiles/edit、GET /users/dashboard、GET /users/index。
B017 方案與卡片管理
GET /packages/index、GET /stripes/index、GET /stripes/get_customer、POST /stripes/remove_card。
B018 Stripe 扣款與 callback
POST /stripes/charge_by_customer、POST /stripes/charge_by_token、POST /stripes/log_charge_event、POST /stripes/notify_payment、GET /transactions/get_quote_bid_by_stripe_id。
B019 郵件與推播失敗 webhook
POST /blogs/handle、POST /blogs/handle_push_fail。
B020 Legacy email/login/SMS 工具
POST /blogs/get_email_template、POST /blogs/get_login_hash、POST /blogs/send_sms。
B021 免費點數活動
GET /free_credit_events/index、POST /free_credit_events/exec、POST /free_credit_event_users/send_review。
B022 CMS/管理查詢與檢舉
GET/POST /quote_reports/add、GET /caches/supported_in_cms、GET /quote_services/search_adm。
狀態流程
每批只使用下列狀態:
待調查
→ Detail 文件完成
→ PHP 8 程式完成
→ PHPUnit 完成
→ Staging QA 完成
→ 待切流
→ Production smoke 完成
→ 完成QA 完成不等於可以切流;Config、ALB path、rollback、DB side effect 與 Production smoke 都必須在該批文件勾選完成。