From 3fcf26bf52dc67229a234a3b7f592590cece01ad Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Wed, 29 May 2024 16:47:03 +0200 Subject: [PATCH 1/2] determine the type from the value to avoid incorrect casting --- CHANGELOG.md | 6 ++++++ src/Row/Value.php | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 136b545..0bdf111 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## [Unreleased] + +### Changed + +- The type of a raw value is now determined from the value instead of using `unspecified` instead. + ## 2.16.0 - 2024-05-29 ### Added diff --git a/src/Row/Value.php b/src/Row/Value.php index d6930e0..1be9f91 100644 --- a/src/Row/Value.php +++ b/src/Row/Value.php @@ -21,7 +21,7 @@ public function __construct(Name|Name\Namespaced $column, mixed $value, Type $ty { $this->column = $column; $this->value = $value; - $this->type = $type ?? Type::unspecified; + $this->type = $type ?? Type::for($value); } public function column(): Name From 9489104c2a6c1acdf9a2adf3200acf48bfeacba1 Mon Sep 17 00:00:00 2001 From: Baptiste Langlade Date: Wed, 29 May 2024 16:56:54 +0200 Subject: [PATCH 2/2] specify next release --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bdf111..81509e4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [Unreleased] +## 2.17.0 - 2024-05-29 ### Changed