I received the followubg bug report on league/uri=polyfill. The package uses the latest version of the library.
<?php
require 'vendor/autoload.php';
var_dump((new Uri\WhatWg\Url('https://example.com/path'))->withScheme('http')->toAsciiString());
var_dump((new Uri\WhatWg\Url('https://user@example.com/path'))->withScheme('http')->toAsciiString());
var_dump((new Uri\WhatWg\Url('https://user:pass@example.com/path'))->withScheme('http')->toAsciiString());
behind the scene the polyfill uses the URL-parser. I tracked down the issue to the following snippet.
$url = new Rowbot\URL\URL('https://user:pass@example.com/path');
$url->protocol = 'http';
echo $url->toString(), PHP_EOL;
// expected 'http://user:pass@example.com/path'
// but got 'https://user:pass@example.com/path'
// with a silent error InvalidCredential
see thephpleague/uri-src#204
I received the followubg bug report on league/uri=polyfill. The package uses the latest version of the library.
behind the scene the polyfill uses the URL-parser. I tracked down the issue to the following snippet.
see thephpleague/uri-src#204