Skip to content

Commit 786f376

Browse files
committed
feat: remove support for deprecated Object type
1 parent cdb52c1 commit 786f376

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

src/Param/ParamValueConverterRegistry.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ final class ParamValueConverterRegistry
4141
'decimal128',
4242
'decimal256',
4343
'enum',
44-
'object',
4544
'json',
4645
];
4746

@@ -104,7 +103,6 @@ public function __construct()
104103
'Enum64' => self::noopConverter(),
105104

106105
'json' => static fn (array|string $value) => is_string($value) ? $value : json_encode($value),
107-
'object' => fn (mixed $v, Type $type) => $this->get(trim($type->params, "'"))($v, $type, true),
108106
'Map' => self::noopConverter(),
109107
'Nested' => function (array|string $v, Type $type) {
110108
if (is_string($v)) {

tests/Param/ParamValueConverterRegistryTest.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ final class ParamValueConverterRegistryTest extends TestCaseBase
3030
{
3131
use WithClient;
3232

33-
private const VersionIntervalJsonObject = 2211;
33+
private const VersionIntervalJson = 2301;
3434

3535
/** @var array<string> */
3636
private static array $types = [];
@@ -127,11 +127,9 @@ public static function providerConvert(): Generator
127127
"((1,'k'),1,2)",
128128
];
129129

130-
if (ClickHouseVersion::get() >= self::VersionIntervalJsonObject) {
130+
if (ClickHouseVersion::get() >= self::VersionIntervalJson) {
131131
yield 'JSON' => ['JSON', '{"k":"v"}', '{"k":"v"}'];
132132
yield 'JSON (array)' => ['JSON', ['k' => 'v'], '{"k":"v"}'];
133-
yield 'Object' => ["Object('JSON')", '{"k":"v"}', '{"k":"v"}'];
134-
yield 'Object (array)' => ["Object('JSON')", ['k' => 'v'], '{"k":"v"}'];
135133
}
136134

137135
yield 'Map' => ['Map(String, UInt64)', "{'k1':1}", "{'k1':1}"];
@@ -219,7 +217,7 @@ public static function providerConvert(): Generator
219217
yield 'Decimal256' => ['Decimal256(2)', 3.33, '3.33'];
220218
}
221219

222-
if (ClickHouseVersion::get() >= self::VersionIntervalJsonObject) {
220+
if (ClickHouseVersion::get() >= self::VersionIntervalJson) {
223221
yield 'IntervalNanosecond' => ['IntervalNanosecond', 1, '1'];
224222
yield 'IntervalMicrosecond' => ['IntervalMicrosecond', 1, '1'];
225223
yield 'IntervalMillisecond' => ['IntervalMillisecond', 1, '1'];

0 commit comments

Comments
 (0)