feat(support)!: use PHP 8.5 native URI parser#2227
Conversation
Benchmark ResultsComparison of Open to see the benchmark results
Generated by phpbench against commit e8d7d1b |
|
I'm trying to decide whether this is breaking or not. We now follow the spec that "an empty path" still needs a Since we only use this URI implementation within the context of requests, my feeling is that this change doesn't have any breaking impact, because the browser will be sending the correct URIs anyway. Anything I'm missing? |
From the Uri::from('https://example.com')->path; // null → '/'
(string) Uri::from('https://example.com'); // 'https://example.com' → 'https://example.com/'Callers may rely on the exact string for comparisons, cache keys, signatures, etc. The new parser also changes more than the empty path, because it normalizes hosts and IDNs, strips default ports, and resolves dot segments. However, as we discussed before, the current behavior is more like a bug. I personally would be fine shipping this as a 3.x bugfix, but I'd mark it as breaking, just for communication's sake. |
Agree |
|
Merged! Thanks @boydbloemsma , really great PR :) |
Fixes: #1641