symfony/polyfill-intl-messageformatter
Symfony polyfill that supplies the IntlMessageFormatter class when PHP's intl extension is unavailable, enabling ICU message formatting and localization in apps on minimal or older PHP setups. A drop-in fallback for consistent message parsing.
selectordinal). This package supplies MessageFormatter and the msgfmt_* functions when PHP's ext-intl is absent, so a localization feature can ship without making a C extension a hard deployment requirement.%s-substitution breaks. selectordinal arriving in this release removes a previously common reason to punt on rank/position/step copy ("your 3rd attempt", leaderboards, checkout flows) or to hardcode English ordinal suffixes. This dependency is the enabler that lets i18n work be scheduled as a product feature rather than blocked behind an infrastructure ticket.Consider it when:
MessageFormatter or msgfmt_format_message, and ICU plural/select/selectordinal syntax is part of the copy strategy. If ordinal copy ("3rd", "21st") is on the roadmap, v1.43.0 is the first release where the polyfill covers it — previously that was a hard argument for requiring ext-intl.ext-intl is not guaranteed across all environments: shared hosting, customer-managed on-prem installs, minimal Docker base images, CI runners, or serverless platforms.Look elsewhere, or push back, when:
ext-intl a documented platform requirement. Native intl is faster and more spec-complete; the polyfill becomes dead weight.NumberFormatter, IntlDateFormatter, timezone handling, locale negotiation. The release notes show adjacent polyfill work (grapheme, Collator sorting, iconv_*) receiving fixes, but that is maintenance of shared polyfill internals, not a commitment to full parity. If those features are central to the roadmap, make the extension a requirement instead of accumulating polyfills.For executives: We can deliver translated, grammatically correct product copy — including plural, gender, and now ordinal variants ("1st, 2nd, 3rd") — without adding a server prerequisite or an infrastructure project. This package is a free, MIT-licensed compatibility layer maintained under the Symfony project that reproduces PHP's built-in internationalization message formatting when that extension isn't installed. The latest release closes a real product gap: ordinal formatting, which powers rank, sequence, and progress copy, is now supported by the polyfill, and it fixes counting and list-punctuation defects that would otherwise reach customers. The commercial value is speed to market in non-English locales and a smaller deployment checklist: fewer environment-specific failures, no per-environment configuration, no licensing cost. The risk is contained — a well-scoped, actively released dependency with a narrow surface area, removable the day we decide to standardize on the native extension.
For engineering: Drop-in, no application code changes — it registers the same class and function names, typically guarded by function_exists, so behavior is identical where intl already exists. Install is transitive or a single Composer line; MIT license; maintained by Symfony with active releases. Two conditions to accept: (1) we add a CI job that runs the suite both with and without ext-intl, now including at least one selectordinal case, so polyfill drift can't reach production silently; and (2) if formatting ever lands on a high-volume path, we revisit and promote ext-intl to a stated platform requirement. Treat it as inexpensive insurance now, with a clear exit criterion.
How can I help you explore Laravel packages today?