Skip to content

fix(payments): require php-intl extension for currency formatting#1488

Merged
JohnVillalovos merged 1 commit into
developfrom
jlvillal/issue_800
Jun 15, 2026
Merged

fix(payments): require php-intl extension for currency formatting#1488
JohnVillalovos merged 1 commit into
developfrom
jlvillal/issue_800

Conversation

@JohnVillalovos

Copy link
Copy Markdown
Collaborator

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

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
Copilot AI review requested due to automatic review settings June 15, 2026 16:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-intl via Composer (composer.json + composer.lock) so installs fail fast when missing.
  • Add intl to 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.

@JohnVillalovos JohnVillalovos merged commit ccd9023 into develop Jun 15, 2026
17 checks passed
@JohnVillalovos JohnVillalovos deleted the jlvillal/issue_800 branch June 15, 2026 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(We cannot format this currency. <a href="http://php.net/manual/en/book.intl.php">You must enable internationalization</a>.)

2 participants