fix: sync $_REQUEST after modifying $_GET in SiteURIFactory #10205
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.31) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.31 · 108 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.289
Diff Size
diff_size
0.281
Real PR Conversation Timeline
1 comments
"Review active on #10205"
general
weight: 0.35
neznaika0
Description
Fixes #9872 - getVar() behaves inconsistently with GET parameters
Problem
When SiteURIFactory modifies $_GET via setGetArray() during request URI parsing, it does not update $_REQUEST. Since IncomingRequest::getVar() reads from $_REQUEST, validation methods like $validator->withRequest() receive stale data.
Solution
1. Add Superglobals::syncRequest() method that rebuilds $_REQUEST from $_GET, $_POST, and $_COOKIE respecting PHP request_order
2. Call syncRequest() in SiteURIFactory after each setGetArray() call
Changes
Testing
Ref: https://github.com/codeigniter4/CodeIgniter4/issues/9872
Closes #9872