Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

EnableJSON_PRESERVE_ZERO_FRACTION injsonRequest method#59769

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

raffaelecarelle
Copy link
Contributor

@raffaelecarelleraffaelecarelle commentedFeb 13, 2025
edited by fabpot
Loading

QA
Branch?6.4
Bug fix?yes
New feature?no
Deprecations?no
Issues
LicenseMIT

Updated the jsonRequest method to use JSON_PRESERVE_ZERO_FRACTION when encoding parameters.
This avoid unintended cast to int.

Test case:

$this->browser->jsonRequest('GET', 'url', ['cost' => 10.0]);

"cost" will be cast to int10

@carsonbot
Copy link

Hey!

Thanks for your PR. You are targeting branch "7.3" but it seems your PR description refers to branch "7.2".
Could you update the PR description or change target branch? This helps core maintainers a lot.

Cheers!

Carsonbot

@carsonbotcarsonbot added this to the7.3 milestoneFeb 13, 2025
@raffaelecarelleraffaelecarelle changed the titleEnable JSON_PRESERVE_ZERO_FRACTION in jsonRequest method[BrowserKit] Enable JSON_PRESERVE_ZERO_FRACTION in jsonRequest methodFeb 13, 2025
@raffaelecarelleraffaelecarelle changed the title[BrowserKit] Enable JSON_PRESERVE_ZERO_FRACTION in jsonRequest method[BrowserKit] EnableJSON_PRESERVE_ZERO_FRACTION injsonRequest methodFeb 13, 2025
@stof
Copy link
Member

this needs a regression tests (which would also help understand which issue is being fixed)

raffaelecarelle reacted with thumbs up emoji

@raffaelecarelleraffaelecarelle changed the base branch from7.3 to7.2February 13, 2025 14:01
@raffaelecarelle
Copy link
ContributorAuthor

this needs a regression tests (which would also help understand which issue is being fixed)

test added

@OskarStark
Copy link
Contributor

Will be cast to int 0? Or do you mean cast to int 10 in the pr description?

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

I suppose we should merge this in 6.4

raffaelecarelle and OskarStark reacted with thumbs up emoji
@carsonbotcarsonbot changed the title[BrowserKit] EnableJSON_PRESERVE_ZERO_FRACTION injsonRequest methodEnableJSON_PRESERVE_ZERO_FRACTION injsonRequest methodFeb 13, 2025
@raffaelecarelle
Copy link
ContributorAuthor

Will be cast to int 0? Or do you mean cast to int 10 in the pr description?

10, sorry.

OskarStark reacted with thumbs up emoji

@fabpotfabpot modified the milestones:7.3,6.4Feb 14, 2025
@fabpot
Copy link
Member

Thank you@raffaelecarelle.

raffaelecarelle reacted with thumbs up emoji

@fabpotfabpot merged commit3062f05 intosymfony:6.4Feb 14, 2025
8 of 10 checks passed
This was referencedFeb 26, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

@mtarldmtarldmtarld approved these changes

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@jderussejderusseAwaiting requested review from jderusse

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees
No one assigned
Projects
None yet
Milestone
6.4
Development

Successfully merging this pull request may close these issues.

7 participants
@raffaelecarelle@carsonbot@stof@OskarStark@fabpot@nicolas-grekas@mtarld

[8]ページ先頭

©2009-2025 Movatter.jp