IDNA Convert v5.0.0 is now available as a stable release.
The runtime code is unchanged from v5.0.0-rc1; this release finalizes the maintenance dates and stable release documentation.
This major release improves Unicode normalization and IDNA validation, adds public validation APIs, and strengthens automated conformance checks. Some inputs accepted by earlier versions are now rejected or produce different normalized results.
This is a major release with breaking changes. Review the migration guide before upgrading.
Highlights
- Unicode 18.0 NFC normalization and non-transitional UTS #46 mapping for IDNA2008.
- Unicode 3.2 NFKC normalization for IDNA2003.
- IDNA2008 contextual and bidirectional validation, including ContextJ and ContextO rules.
- Validation of canonical A-labels, hyphen placement, and DNS label and domain lengths.
- Public
InputValidatorandIdnaValidatorAPIs. - Expanded regression tests and reproducible Unicode data generation.
Breaking changes
- Stricter validation rejects malformed or non-canonical A-labels, invalid contextual or bidirectional sequences, and prohibited characters.
- Empty labels and labels that become empty after mapping are rejected. DNS length validation is enabled by default and also rejects names with a trailing dot, such as
example.com.. See the migration guide for theverifyDnsLengthoption. - Normalization and mapping changes can alter conversion results. IDNA2008 preserves
ßand final sigma. - Native API types and changes to the
PunycodeInterfaceconstructor require updates to some custom implementations and subclasses. ToPunycode::convert()and UCS-4 transcoding to another encoding in the default strict mode now require consecutive, zero-based lists of integer Unicode scalar values. Reindex existing arrays witharray_values()where needed.- The protected
AbstractPunycode::$unicodeTransCoderproperty has been replaced by$ucs4Codec.
See UPGRADING.md for details, configuration options, and migration guidance.
The minimum PHP version remains 8.1.
Verification
- 476 tests with 2,518 assertions.
- 185,815 Unicode normalization assertions.
- All 6,396 cases in the pinned Unicode 18.0 ToASCII corpus checked without omissions: 398 exact results, 5,836 corpus-required rejections, 160 stricter IDNA2008 rejections, and 2 malformed UTF-8 inputs rejected.
- PHPStan level 10, coding-standard checks, mutation testing, and consumer installation checks.
The ToASCII checks cover non-transitional UTS #46 mapping followed by strict IDNA2008 validation. They do not establish full UTS #46 conformance or conformance of the separate ToUnicode decoder.
Installation
composer require algo26-matthias/idna-convert:5.0.0Check existing domain collections, URLs, email addresses, and custom interface implementations for changed conversion results and newly raised exceptions, especially when comparing or storing normalized domain names.
Please report unexpected behavior through GitHub Issues, including the input, expected and actual behavior, PHP version, and converter options.
Version support
The support periods start with this stable release on 24 November 2026:
- v5: active development and maintenance.
- v4: security fixes and important backward-compatible bug fixes until 24 November 2027.
- v3: critical security fixes, where a backport is feasible, until 24 February 2027.
See SECURITY.md for the maintenance policy.