Skip to content

Conversation

@xabbuh
Copy link
Member

@xabbuh xabbuh commented Sep 29, 2025

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

the last PHP 8.5 related failure for the 6.4 branch that we can fix on our end (see https://github.com/symfony/symfony/actions/runs/18059816827/job/51394530342#step:8:2731)

@xabbuh xabbuh requested a review from yceruto as a code owner September 29, 2025 09:03
@carsonbot carsonbot added this to the 6.4 milestone Sep 29, 2025
@carsonbot carsonbot changed the title [Form] do not cast too big floats to int [Form] do not cast too big floats to int Sep 29, 2025
@stof
Copy link
Member

stof commented Sep 29, 2025

The whole method looks weird to me. If the value is an int that can also be represented as a float without precision loss, return the float ? Why doing that ?

@xabbuh
Copy link
Member Author

xabbuh commented Sep 29, 2025

The whole method looks weird to me. If the value is an int that can also be represented as a float without precision loss, return the float ? Why doing that ?

I was wondering the same but getting rid of the cast means that the NumberType will then return integers where it previously returned floats leading to several related test failures.

This piece of code was introduced in #18358 to fix #18346.

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 372d809 into symfony:6.4 Sep 29, 2025
9 of 11 checks passed
@xabbuh xabbuh deleted the php-19760 branch September 29, 2025 16:56
This was referenced Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants