Skip to content

[Form] Fix precision loss when rounding large integers in NumberToLocalizedStringTransformer #60975

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

OskarStark
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #60947
License MIT

@carsonbot carsonbot added this to the 6.4 milestone Jun 30, 2025
@carsonbot carsonbot changed the title Fix precision loss when rounding large integers in NumberToLocalizedStringTransformer [Form] Fix precision loss when rounding large integers in NumberToLocalizedStringTransformer Jun 30, 2025
…StringTransformer`

Add type check in `round()` method to bypass rounding for integer values,
preventing precision loss for large integers that are still below PHP_INT_MAX.

🤖 Generated with [Claude Code](https://claude.ai/code)
@OskarStark OskarStark force-pushed the fix-number-transformer-precision-6.4 branch from dca4cfb to bf312d3 Compare July 1, 2025 18:07
@OskarStark
Copy link
Contributor Author

Failure looks unrelated

@nicolas-grekas
Copy link
Member

Thank you @OskarStark.

@nicolas-grekas nicolas-grekas merged commit 4f5545b into symfony:6.4 Jul 7, 2025
9 of 11 checks passed
@nicolas-grekas
Copy link
Member

Sorry I missed that before merge: this breaks on x86, see the windows build.

@OskarStark OskarStark deleted the fix-number-transformer-precision-6.4 branch July 7, 2025 10:36
@OskarStark
Copy link
Contributor Author

I think #61055 should fix it @nicolas-grekas

nicolas-grekas added a commit that referenced this pull request Jul 7, 2025
…ark)

This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

[Form] Skip windows x86 number transformer test

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        | #60975
| License       | MIT

Follows #60975 (comment)

Commits
-------

a426cdd [Form] Skip windows x86 number transformer test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy