mso/idna-convert
A PHP library for converting internationalized domain names between Unicode and ASCII/Punycode. Supports IDNA 2003 and 2008, making it useful for handling domains in URLs, email addresses, and web applications. Pure PHP implementation with straightforward encode/decode APIs.
.中国, .рф, .भारत, Arabic-script labels) are how a meaningful share of users type their own web. This package decides whether onboarding, login, and storefront can accept those inputs at all — a hard gate for launches in those markets.rel=canonical, hreflang, and redirects — affects indexation for localized properties.Consider it when:
ext-intl / ICU dependency — shared hosting, minimal containers, or production images you can't easily rebuild.mso/idna-convert lineage and want a maintained continuation. Treat the fork as a like-for-like swap only after checking provenance, changelog, and test coverage.Look elsewhere when:
symfony/polyfill-intl-idn (MIT, ubiquitous, also works without ext-intl) or ext-intl's idn_to_ascii when ICU is acceptable. Make one of these the default choice; deviate only for the determinism reason above.Adoption guardrails: pin an exact version; wrap it behind an internal IdnConverter / DomainNormalizer interface so the vendor is swappable in days; own test fixtures for the specific scripts and TLDs we care about; watch upstream release cadence (recent releases are a positive signal — confirm it holds).
Executives: This is a small, tactical dependency that unlocks international customers — it lets us accept and display native-script domains and email addresses instead of rejecting them as invalid. Cost is close to zero: one pure-PHP library, no PHP extensions, no infrastructure change, no migration. The strategic value is market reach and reduced signup friction. The risk is maintenance depth — a small maintainer base and low adoption mean we can't outsource our confidence to the ecosystem — which we mitigate by isolating it behind an internal interface, making replacement a days-not-quarters exercise. Licensing is LGPL, fine for our hosted service, requiring a legal nod only if we ship on-prem. Recommendation: approve as a scoped enabler for [target market/feature], not as a platform bet.
Engineering: One dependency, zero transitive dependencies, no ext-intl requirement, and — the actual reason to prefer it — deterministic IDNA behavior independent of the host's ICU version, which the polyfill and ext-intl cannot promise across our pinned runtime fleet. We wrap it in a single normalization service, store A-labels canonically, render U-labels, and own fixtures for our target scripts. It does not do confusable detection; anti-spoofing is a separate scope decision, not a gap in this package. Effort is a small slice: conversion utility, schema/index confirmation, validation hooks, tests. Ongoing cost is a version pin plus a periodic upstream health check.
How can I help you explore Laravel packages today?