Skip to content

[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers #18179

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
merged 2 commits into from
Mar 15, 2016

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch 2.3
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #18077, #18067
License MIT
Doc PR -

@nicolas-grekas nicolas-grekas changed the title Parse as int [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers Mar 15, 2016
if (false !== strpos($value, $decSep)) {
$type = \NumberFormatter::TYPE_DOUBLE;
} else {
$type = PHP_INT_SIZE === 8
Copy link
Member

Choose a reason for hiding this comment

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

Very minor comment: should this ternary condition be a one-liner?

Copy link
Member Author

Choose a reason for hiding this comment

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

it wouldn't enhance readability imho

@nicolas-grekas nicolas-grekas merged commit 03c008c into symfony:2.3 Mar 15, 2016
nicolas-grekas added a commit that referenced this pull request Mar 15, 2016
…sform with big integers (ovrflo, nicolas-grekas)

This PR was merged into the 2.3 branch.

Discussion
----------

[Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers

| Q             | A
| ------------- | ---
| Branch        | 2.3
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18077, #18067
| License       | MIT
| Doc PR        | -

Commits
-------

03c008c [Form] Fix NumberToLocalizedStringTransformer::reverseTransform with big integers
6b6073f [Form] Fix INT64 cast to float in IntegerType.
@nicolas-grekas nicolas-grekas deleted the parse-as-int branch March 15, 2016 15:49
This was referenced Mar 25, 2016
@fabpot fabpot mentioned this pull request Mar 30, 2016
@fabpot fabpot mentioned this pull request Apr 29, 2016
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.

4 participants