parse_url() has many major flaws.
Diactoros should adopt new Uri extension introduced with 8.5 for its url parsing needs.
Consider using polyfill https://uri.thephpleague.com/polyfill/7.0/ to drop parse_url() entirely.
This extension will not solve the major PSR flaw where UriInterface is declared as following RFC 3986 but in practice is used with IRI and whatwg urls with no sensible means to distinguish normalized forms.
It will solve a great deal of parse_url() issues where badly malformed URLs conforming to no specification produce wildly unexpected results.
parse_url()has many major flaws.Diactoros should adopt new Uri extension introduced with 8.5 for its url parsing needs.
Consider using polyfill https://uri.thephpleague.com/polyfill/7.0/ to drop
parse_url()entirely.This extension will not solve the major PSR flaw where UriInterface is declared as following RFC 3986 but in practice is used with IRI and whatwg urls with no sensible means to distinguish normalized forms.
It will solve a great deal of
parse_url()issues where badly malformed URLs conforming to no specification produce wildly unexpected results.