Skip to content

Commit c9f3b21

Browse files
committed
Fix unknown double type when passing floats again
1 parent 9f7230e commit c9f3b21

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 0.8.5 (2025-11-06)
4+
5+
- [fix] Unknown double type when passing floats again
6+
37
## 0.8.4 (2025-11-06)
48

59
- [fix] Unknown double type when passing floats

src/Distill.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Distill
2222

2323
const TYPE_RAW_BOOLEAN = 'raw:boolean';
2424

25-
const TYPE_RAW_FLOAT = 'raw:double';
25+
const TYPE_RAW_FLOAT = 'raw:float';
2626

2727
const TYPE_RAW_INTEGER = 'raw:integer';
2828

src/Items/Collector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ protected function collectValue($value, $path = [], $type = null, $setType = nul
7979
$type = Distill::TYPE_VALUE.':'.optional($value->fieldtype())->handle() ?? 'unknown';
8080
} else {
8181
$raw = Str::slug(gettype($value));
82+
if ($raw === 'double') {
83+
$raw = 'float';
84+
}
8285
$type = Distill::TYPE_RAW.':'.$raw;
8386
if (! in_array($type, [
8487
Distill::TYPE_RAW_ARRAY,

0 commit comments

Comments
 (0)