New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[6.5] Install symfony's intl-idn polyfill #2550
Conversation
NB: /**
* @expectedException \GuzzleHttp\Exception\InvalidArgumentException
* @expectedExceptionMessage IDN conversion failed (errors: IDNA_ERROR_LEADING_HYPHEN)
*/
public function testExceptionOnInvalidIdn()
{
if (!extension_loaded('intl')) {
self::markTestSkipped('intl PHP extension is not loaded');
}
$mockHandler = new MockHandler([new Response()]);
$client = new Client(['handler' => $mockHandler]);
$client->request('GET', 'https://-яндекс.рф/images', ['idn_conversion' => true]);
} The following test fails with the polyfill, since they don't seem to detect the leading slash, so I have left the test conditional on the real extension being loaded. |
|
@ChrisThompsonTLDR You'll need to combine both my PRs, since patch-2 only contains support for intl without the intl extension, but not my first fix. |
I've pushed a branch |
@GrahamCampbell your branch
results in
and then
results in
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
* Travis improvements * Don't use internal functions (#2548) * [6.5] Install symfony's intl-idn polyfill (#2550) * Install symfony's intl-idn polyfill * idn conversion always available * remove "skipped because of intl" * PHPStan CI fix Co-authored-by: Nyholm <tobias.nyholm@gmail.com> * Prepare release of 6.5.3 (#2613) * Prepare release of 6.5.3 * Typo * Updated date * Updated constant * Fixed composer.json package order Co-authored-by: Márk Sági-Kazár <sagikazarmark@users.noreply.github.com> Co-authored-by: Nyholm <tobias.nyholm@gmail.com>
Composer will now, instead, suggest
ext-intl
for better performance, instead of suggestingext-intl
and having Guzzle crash at runtime with an error people won't understand.