fix(payments): require php-intl extension for currency formatting#1488
Merged
Conversation
The intl extension (NumberFormatter) is required for correct currency formatting of non-USD currencies. Without it, the Payments feature displayed a raw HTML error string in place of the formatted amount. Make intl a hard requirement so the problem is caught at install time rather than silently producing a broken UI at runtime: - Add ext-intl to composer.json require (Composer enforces on install) - Add intl to REQUIRED_EXTENSIONS in lib/preflight.php - Add intl to the extensions list in integration-tests.yml CI workflow - Update README.md and AGENTS.md prerequisites to include intl Closes: #800 Assisted-by: Claude:claude-sonnet-4-6
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes PHP’s intl extension (specifically NumberFormatter) a hard prerequisite so currency formatting in the Payments feature can’t silently degrade into a broken UI at runtime.
Changes:
- Require
ext-intlvia Composer (composer.json+composer.lock) so installs fail fast when missing. - Add
intlto the preflight required-extension checks (lib/preflight.php). - Ensure CI integration tests provision
intl, and update prerequisite docs (README.md,AGENTS.md).
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Documents intl as a required PHP extension for installs. |
| lib/preflight.php | Enforces intl at preflight time via REQUIRED_EXTENSIONS. |
| composer.lock | Locks platform requirements to include ext-intl. |
| composer.json | Adds ext-intl to Composer require to enforce at install time. |
| AGENTS.md | Updates agent/dev prerequisites to include intl. |
| .github/workflows/integration-tests.yml | Installs intl in the integration test job environment. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The intl extension (NumberFormatter) is required for correct currency formatting of non-USD currencies. Without it, the Payments feature displayed a raw HTML error string in place of the formatted amount.
Make intl a hard requirement so the problem is caught at install time rather than silently producing a broken UI at runtime:
Closes: #800
Assisted-by: Claude:claude-sonnet-4-6