Commit 3062f05
committed
This PR was submitted for the 7.2 branch but it was squashed and merged into the 6.4 branch instead.
Discussion
----------
Enable `JSON_PRESERVE_ZERO_FRACTION` in `jsonRequest` method
| Q | A
| ------------- | ---
| Branch? | 7.2
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues |
| License | MIT
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 int `10`
Commits
-------
535953e Enable `JSON_PRESERVE_ZERO_FRACTION` in `jsonRequest` method
File tree
2 files changed
+3
-3
lines changed- src/Symfony/Component/BrowserKit
- Tests
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
0 commit comments