File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
src/main/php/text/json/patch Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ JSON patch change log
3
3
4
4
## ?.?.? / ????-??-??
5
5
6
+ ## 2.1.1 / 2025-08-16
7
+
8
+ * Fixed * Non-canonical cast (double) is deprecated* in PHP 8.5 - @thekid
9
+
6
10
## 2.1.0 / 2024-03-24
7
11
8
12
* Made compatible with XP 12 - @thekid
Original file line number Diff line number Diff line change @@ -32,10 +32,10 @@ public function applyTo(&$target) {
32
32
$ address = $ this ->path ->resolve ($ target );
33
33
if ($ address ->exists ()) {
34
34
$ value = $ address ->value ();
35
- if (is_int ($ value ) && is_double ($ this ->value )) {
36
- $ equal = (double )$ value === $ this ->value ;
37
- } else if (is_double ($ value ) && is_int ($ this ->value )) {
38
- $ equal = $ value === (double )$ this ->value ;
35
+ if (is_int ($ value ) && is_float ($ this ->value )) {
36
+ $ equal = (float )$ value === $ this ->value ;
37
+ } else if (is_float ($ value ) && is_int ($ this ->value )) {
38
+ $ equal = $ value === (float )$ this ->value ;
39
39
} else {
40
40
$ equal = Objects::equal ($ value , $ this ->value );
41
41
}
You can’t perform that action at this time.
0 commit comments