Skip to content

Commit 8cb5db6

Browse files
committed
Merge branch '5.3' into 5.4
* 5.3: [Tests] Remove some unused fixtures added missing translations for portuguese [#43726] [HttpClient][Mime] Add correct IDN flags for IDNA2008 compliance properly parse quoted strings tagged with !!str do not merge label classes into expanded choice labels [Serializer] PropertyNormalizer - return unique (i.e. filter duplicate ) attributes in extractAttributes function
2 parents 23591dc + 3f55da6 commit 8cb5db6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

HttpClientTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
496496
throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host));
497497
}
498498

499-
$host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
499+
$host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT | \IDNA_USE_STD3_RULES | \IDNA_CHECK_BIDI | \IDNA_CHECK_CONTEXTJ | \IDNA_NONTRANSITIONAL_TO_ASCII, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
500500
$host .= $port ? ':'.$port : '';
501501
}
502502

Tests/HttpClientTraitTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ public function provideParseUrl(): iterable
163163
yield [[null, null, 'bar', '?a%5Bb%5Bc%5D=d', null], 'bar?a[b[c]=d', []];
164164
yield [[null, null, 'bar', '?a%5Bb%5D%5Bc%5D=dd', null], 'bar?a[b][c]=d&e[f]=g', ['a' => ['b' => ['c' => 'dd']], 'e[f]' => null]];
165165
yield [[null, null, 'bar', '?a=b&a%5Bb%20c%5D=d&e%3Df=%E2%9C%93', null], 'bar?a=b', ['a' => ['b c' => 'd'], 'e=f' => '']];
166+
// IDNA 2008 compliance
167+
yield [['https:', '//xn--fuball-cta.test', null, null, null], 'https://fußball.test'];
166168
}
167169

168170
/**

0 commit comments

Comments
 (0)