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.
MessageFormatter / msgfmt_* behavior and ext-intl is unavailable or intentionally avoided.MessageFormatter requirement.selectordinal (previously a known gap versus native ext-intl), and correctness fixes land for integer rounding, English list patterns, and Collator sorting. That narrows — but does not eliminate — native-versus-polyfill output drift around ICU syntax, locale data, plural/select/ordinal rules, and edge-case formatting. Environment parity between hosts with and without ext-intl still requires testing. Provenance risk is now materially lower: the changelog points to github.com/symfony/polyfill-intl-messageformatter, confirming the canonical Symfony package under MIT, which supersedes the earlier “repository unknown” concern. Residual supply-chain diligence: the release jumps from v1.38.0 to v1.43.0, so verify the intervening version history (no skipped major-version surprises) and confirm Packagist metadata before pinning.ext-intl available in all environments? Is the package direct or transitive? Which MessageFormatter features and locales are required — specifically, is selectordinal now needed, and does that justify a direct requirement rather than relying on a transitively pulled older version? Can Laravel’s translator or native ext-intl satisfy the need instead? Are parsing and formatting both required? What fallback occurs when ICU data or syntax is unsupported? What PHP/Laravel/Symfony version constraints apply to v1.43.0, and does the version bump alter them? Who owns locale-quality testing, including ordinal and list-pattern output?MessageFormatter. It remains a partial replacement for ext-intl, scoped to MessageFormatter-related functionality. If ext-intl is installed, the polyfill is typically inert, but platform configuration must reflect reality.MessageFormatter and msgfmt_*. Prefer native ext-intl in production where possible. If unavailable, add the polyfill and validate output parity — now including selectordinal and list-formatting paths, which this release touches. If already pulled transitively, avoid adding a direct requirement unless application code calls it explicitly; if it is transitive, confirm which version Composer resolves, since an older pin would miss the new ordinal support and rounding fixes.composer why, and lock the version. Test with and without ext-intl; do not fake ext-intl in Composer platform config unless the polyfill path is intentional. Validate supported ICU message patterns and locale coverage, adding ordinal patterns to the test matrix.ext-intl; 4) re-run parity tests against native ext-intl, with focused checks on ordinal, list, rounding, and collation behavior; 5) deploy to staging/canary; 6) monitor formatting failures and fallbacks; 7) document supported syntax and rollback. If no concrete need exists, do not add it directly.selectordinal), and fallback behavior.ext-intl, so cache formatted messages where practical and avoid repeated parsing of large catalogs per request.ext-intl nor the polyfill is available; unsupported ICU syntax causing exceptions or raw output; locale-data gaps producing incorrect plurals, selects, ordinals, or list separators; native-versus-polyfill output drift; Composer conflicts or unresolved older polyfill versions masking new fixes; parse failures on invalid or untrusted message patterns; silent fallback to translation keys. Because this release spans shared intl helper code (grapheme, iconv, Collator), regressions outside strict MessageFormatter usage are conceivable — include a smoke test of any adjacent intl behavior relied on.ext-intl availability, version pinning, and localization QA sign-off on ordinal and list output.How can I help you explore Laravel packages today?