Skip to content

Fix the package audit findings on 8.4.x - #26

Merged
MoamenEltouny merged 6 commits into
8.4.xfrom
fix/audit-findings-8.4.x
Dec 1, 2026
Merged

MoamenEltouny merged 6 commits into
8.4.xfrom
fix/audit-findings-8.4.x

Conversation

@MoamenEltouny

@MoamenEltouny MoamenEltouny commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes the findings from the package audit of the 8.4.x line: Money::format() could print a negative zero with a locale, internal helpers lived in the forbidden Support/ folder, CI had no staged quality gate, the docs had no upgrade guide, and a few baseline files had drifted from the template.

Changes

  • Money::format() with a $locale compares the amount with Intl's own formatted zero instead of rounding with the ISO 4217 digits. Intl uses other digits for 26 currencies (IQD has 0, not 3), so Money::format(-0.4, 'IQD', locale: 'en_US') returned "-IQD 0"; it now returns "IQD 0". The regression test takes the amount from Intl's digits, so it holds on any ICU version.
  • The forbidden Support/ folder is gone. Assert and Excerpt move to Pharaonic\Readable, and Intl becomes Services\Integration\IntlService, since it is the integration with ext-intl. All three stay @internal. tests/Feature/.gitkeep is gone; PHPUnit discovers everything under tests/.
  • CI runs validate, style, analyse, tests (Linux/Windows, lowest/highest, plus one job without intl), security and an archive check in order with fail-fast, ending in a Quality gate job. Third-party actions are pinned to commit SHAs.
  • Baseline: direct phpunit/phpunit security floor, Dependabot area: dependencies labels, [Bug]: issue title prefix, README build badge for 8.4.x, and CONTRIBUTING/CODE_OF_CONDUCT wording from the template.
  • Docs: a final upgrade guide (patches, moving between PHP lines, changelog links) and a 8.4.3 - Unreleased changelog section.

Compatibility

No public API change. Output changes only where it used to print a negative zero. The moved helpers were @internal.

Notes

Same change is opened for every line (8.0.x to 8.5.x); develop gets it by merging 8.5.x after release. After CI passes, Quality gate can be made a required check on develop and the release lines.

@MoamenEltouny MoamenEltouny self-assigned this Dec 1, 2026
@MoamenEltouny
MoamenEltouny merged commit 0164189 into 8.4.x Dec 1, 2026
12 checks passed
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.

1 participant