PHP 8 API 搬移批次

最後更新:2026-08-10

現在從哪裡開始

  • 目前執行批次是 B001:評價、評價標籤與回覆。這批 5 組 API 都已有 PHP 8 程式,現在要完成 Staging QA 與切流條件,不是再寫一套 endpoint。
  • 下一個具體動作是補完 quote_feedback_tags/indexx-php-env 證據,再測 quote_feedbacks/sent,最後測 quote_feedback_comments/save/delete 的 DB side effect。
  • B001 完成後才進 B002「分類樹與子分類」。B002 的 get_category_mappro_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 890
已有 PHP 8 程式,正式仍走 Legacy59
已有 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評價、評價標籤與回覆55/029,227Web + curl第一批;待整組 Staging QA
B002分類樹與子分類65/18,278,851Web/App + curl兩支低流量 API 已補;pro_selection_list 疑似未使用;優先補 quote_category_groups/meta
B003需求建立、修改與複製44/0155,157Web + curl待整組 parity/QA/切流
B004服務類別與計價表單44/0114,364Web + curl待整組 parity/QA/切流
B005專家服務建立與狀態54/173,157Web + curl需補 add_quote_faq
B006外部評價邀請與問卷44/024,346Web + curl待 caller 與資料前置確認
B007報價前費用與內容44/0234,359Web/App + curl付款相關;高風險
B008Narrow match 邀請33/074,837Web/App + curl待整組 parity/QA/切流
B009聯絡專家與電話計費33/029,936App/callback + curl付款、callback;高風險
B010案件受僱、自聘與評價狀態55/0132,673Web/App + curl付款/狀態/通知;高風險
B011案件對話與常用訊息55/0416,016Web/App + curl高流量;待整組 QA
B012登入、一次登入與社群登入66/0252,514Web/AppSession/cookie;高風險
B013註冊與驗證52/3149,561Web/App + curl需專用可拋棄帳號
B014密碼修改與重設32/128,865Web + curl需專用可拋棄帳號
B015推薦碼與推薦紀錄22/0355Web/App + curl待 caller 確認
B016帳號設定與刪除52/31,727Web + curl刪除測試需專用帳號
B017方案與卡片管理42/260,007Web/App + curlPayment;不可使用正式卡資料
B018Stripe 扣款與 callback50/51,707Callback + curlPayment/internal;先查 caller
B019郵件與推播失敗 webhook20/2181,326SNS/SendGrid/Vonage外部 webhook;不能用一般頁面代測
B020Legacy email/login/SMS 工具30/34,506Internal caller先確認 owner、簽章與 payload
B021免費點數活動30/32,750Web/cron 待確認先確認 caller 與 DB side effect
B022CMS/管理查詢與檢舉40/425,860CMS/Admin 待確認先確認真實 caller,避免把 bot 當功能

合計:90 組;已有程式 60 組,缺少程式 30 組。

批次範圍

B001 評價、評價標籤與回覆

GET /quote_feedback_tags/indexPOST /quote_feedback_comments/saveGET/POST /quote_feedback_comments/deleteGET /quote_feedbacks/sent

QA 文件:B001 評價、評價標籤與回覆

B002 分類樹與子分類

GET /quote_category_subgenres/indexGET /quote_categories/index/type:treePOST /quote_categories/relatedGET /quote_categories/get_category_mapGET /quote_category_groups/metaGET /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.jsonGET /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/indexquote_categories/index/type:treequote_categories/related;仍需各自完成 parity 與 QA,不能只因程式存在就切流。

B003 需求建立、修改與複製

POST /quote_requests/search_addGET/POST /quote_requests/editPOST /quote_requests/copy

B004 服務類別與計價表單

POST /quote_service_categories/addPOST /quote_service_categories/editGET /quote_service_categories/pricing_formGET /quote_services/static_fields

B005 專家服務建立與狀態

POST /quote_services/addPOST /quote_services/editPOST /quote_services/change_status/profile_readyPOST /quote_services/change_status/archivePOST /quote_services/add_quote_faq

B006 外部評價邀請與問卷

GET /quote_services/external_review/linkPOST /quote_services/external_review/submitPOST /quote_bids/provider_request_reviewPOST /quote_bids/add_consumer_survey

B007 報價前費用與內容

GET /quote_bids/preview_quote_feePOST /quote_bids/editPOST /quote_bids/switch_to_manual_quotePOST /quote_bids/provider_receive_phone

B008 Narrow match 邀請

POST /quote_bids/consumer_want_provider_quotePOST /quote_bids/provider_accept_narrow_matchGET /quote_bids/consumer_want_to_see_more_quote

B009 聯絡專家與電話計費

POST /quote_bids/want_to_contact_providerPOST /quote_bids/want_to_contact_provider_for_call_jwtPOST /quote_bids/call_fee_jwt

B010 案件受僱、自聘與評價狀態

GET/POST /quote_bids/change_status/hiredPOST /quote_bids/change_status/ratingPOST /quote_bids/change_status/reviewsPOST /quote_bids/change_status/self_hire

B011 案件對話與常用訊息

GET/POST /messages/quote_conversationPOST /user_can_messages/addPOST /user_can_messages/editPOST /user_can_messages/delete

B012 登入、一次登入與社群登入

GET/POST /users/loginGET/POST /users/login_onceGET /users/logoutPOST /users/connect_social

B013 註冊與驗證

POST /users/sign_upPOST /users/verifyPOST /users/validate_userPOST /users/send_otp_to_phone_by_emailGET /users/register

B014 密碼修改與重設

POST /users/forgot_passwordPOST /users/reset_passwordPOST /users/change_password

B015 推薦碼與推薦紀錄

POST /users/referGET /users/referrals

B016 帳號設定與刪除

POST /users/deletePOST /users/update_auto_refillGET /user_profiles/editGET /users/dashboardGET /users/index

B017 方案與卡片管理

GET /packages/indexGET /stripes/indexGET /stripes/get_customerPOST /stripes/remove_card

B018 Stripe 扣款與 callback

POST /stripes/charge_by_customerPOST /stripes/charge_by_tokenPOST /stripes/log_charge_eventPOST /stripes/notify_paymentGET /transactions/get_quote_bid_by_stripe_id

B019 郵件與推播失敗 webhook

POST /blogs/handlePOST /blogs/handle_push_fail

B020 Legacy email/login/SMS 工具

POST /blogs/get_email_templatePOST /blogs/get_login_hashPOST /blogs/send_sms

B021 免費點數活動

GET /free_credit_events/indexPOST /free_credit_events/execPOST /free_credit_event_users/send_review

B022 CMS/管理查詢與檢舉

GET/POST /quote_reports/addGET /caches/supported_in_cmsGET /quote_services/search_adm

狀態流程

每批只使用下列狀態:

待調查
→ Detail 文件完成
→ PHP 8 程式完成
→ PHPUnit 完成
→ Staging QA 完成
→ 待切流
→ Production smoke 完成
→ 完成

QA 完成不等於可以切流;Config、ALB path、rollback、DB side effect 與 Production smoke 都必須在該批文件勾選完成。