Url::fromHttp() rely on the $_SERVER superglobal variable to provide request information.
It should either receive the provider array as part of the arguments or rely on the filter_input_array(INPUT_SERVER) as being authoritative.
Perhaps, change signature to
function fromHttp(array $overrides = [], $trust_x_forwarded_headers = true, array $src = [])
{
$src = $src ?: \filter_input_array(INPUT_SERVER);
//…
}