Skip to content

Commit 977f507

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [Tests] Remove some unused fixtures added missing translations for portuguese [#43726] [HttpClient][Mime] Add correct IDN flags for IDNA2008 compliance Prevent installation of incompatible mailer component versions properly parse quoted strings tagged with !!str do not merge label classes into expanded choice labels Bump Symfony version to 5.4.0 Update VERSION for 5.4.0-BETA3 Update CHANGELOG for 5.4.0-BETA3 [Serializer] PropertyNormalizer - return unique (i.e. filter duplicate ) attributes in extractAttributes function Allow autodetecting mapping type for any object
2 parents 6727ed1 + 8cb5db6 commit 977f507

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
@@ -488,7 +488,7 @@ private static function parseUrl(string $url, array $query = [], array $allowedS
488488
throw new InvalidArgumentException(sprintf('Unsupported IDN "%s", try enabling the "intl" PHP extension or running "composer require symfony/polyfill-intl-idn".', $host));
489489
}
490490

491-
$host = \defined('INTL_IDNA_VARIANT_UTS46') ? idn_to_ascii($host, \IDNA_DEFAULT, \INTL_IDNA_VARIANT_UTS46) ?: strtolower($host) : strtolower($host);
491+
$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);
492492
$host .= $port ? ':'.$port : '';
493493
}
494494

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)