algo26-matthias/idna-convert
PHP library for converting internationalized domain names between Unicode and Punycode. Implements IDNA 2003 and UTS #46 (IDNA 2008) standards with configurable encoding and decoding options. A mature, standalone package compatible with PHP 5.3 through 8.x and used by phpMyAdmin.
münchen.de, 例え.jp, Arabic/Cyrillic TLDs) in signup, checkout, storefront, and email flows. This package is the conversion layer that makes those flows possible without native extensions.ext-intl/ICU availability in our hosting or container image. This directly affects whether we can ship IDN features to customers on shared hosting, older PaaS runtimes, or locked-down enterprise deployments.Consider it when:
ext-intl is unavailable or cannot be guaranteed across our deployment targets (shared hosting, minimal containers, Windows dev parity, per-tenant runtime variance).encode() / decode() around domain strings.DomainNormalizer) so the implementation is swappable — this package becomes one adapter behind that interface.Look elsewhere when:
ext-intl is reliably available. Native idn_to_ascii() / idn_to_utf8() with ICU is the default choice: faster, battle-tested, no supply-chain exposure. Choose it unless we have a concrete reason not to.symfony/polyfill-intl-idn (MIT) is the pure-PHP, Composer-native, widely-deployed alternative and should be the first comparison — it's often the better buy on maintenance and legal grounds alone.league/uri, Symfony's HttpFoundation/Routing) that wraps IDN conversion rather than calling a converter directly in application code.To executives: This is a small, low-cost utility that unblocks international domain support without changing our infrastructure. It lets us serve customers in non-Latin-script markets — a prerequisite for expansion into several target regions — for roughly the cost of one integration task. The two things to know: it carries a copyleft-flavored license (LGPL-2.1) that legal should clear before we ship it in distributed code, and it is a low-adoption, single-maintainer project rather than a vendor-supported component. Both are manageable if we isolate it behind our own interface and keep the swap to PHP's built-in intl as a one-line change. Recommendation: approve for a bounded spike, not as a permanent platform commitment.
To engineering: Pure-PHP IDNA/Punycode converter, Composer-installable, no ext-intl requirement — the value is portability across environments where ICU isn't guaranteed. Please treat it as an implementation detail: put it behind a DomainNormalizer contract with toAscii() / toUnicode(), pin the exact version, vendor the source, and add our own conformance fixtures (mixed-script, deviation characters, trailing-dot, uppercase, empty-label cases). Do not call it inline in controllers; all hostname comparison, allowlisting, and uniqueness checks must run through the normalizer so we never compare raw Unicode to Punycode. Document the fallback path to native idn_to_ascii() and benchmark both.
To legal/security: LGPL-2.1 — please confirm obligations for our distribution model. Separately, flag that this component is security-relevant: correct IDN canonicalization is a control against homograph/lookalike and allowlist-bypass attacks, so an unmaintained converter is a latent risk. Ask for a maintenance check (release cadence, open security issues, maintainer responsiveness) before we rely on it in any trust boundary.
How can I help you explore Laravel packages today?