From 8686da0745ac6ba308302ec1cea629661f602f2b Mon Sep 17 00:00:00 2001 From: Adam Dyson Date: Wed, 16 Jul 2025 20:08:04 +1000 Subject: [PATCH 1/3] Added new column type support for Snowflake and ULID identifiers --- src/Annotation/Column.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Annotation/Column.php b/src/Annotation/Column.php index aec7a99..cf5aad8 100644 --- a/src/Annotation/Column.php +++ b/src/Annotation/Column.php @@ -51,7 +51,7 @@ public function __construct( #[ExpectedValues(values: ['primary', 'bigPrimary', 'enum', 'boolean', 'integer', 'tinyInteger', 'smallInteger', 'bigInteger', 'string', 'text', 'tinyText', 'longText', 'double', 'float', 'decimal', 'datetime', 'date', 'time', 'timestamp', 'binary', 'tinyBinary', 'longBinary', 'json', - 'uuid', 'bit', + 'snowflake', 'ulid', 'uuid', 'bit', // PostgreSQL 'smallPrimary', 'timetz', 'timestamptz', 'interval', 'bitVarying', 'int4range', 'int8range', 'numrange', 'tsrange', 'tstzrange', 'daterange', 'jsonb', 'point', 'line', 'lseg', 'box', 'path', 'polygon', 'circle', From 66769ef3bd8692809fbeefecc7e6289c79e5a2e1 Mon Sep 17 00:00:00 2001 From: github-actions Date: Wed, 16 Jul 2025 10:08:32 +0000 Subject: [PATCH 2/3] style(php-cs-fixer): fix coding standards --- tests/Annotated/Fixtures/Fixtures26/City.php | 8 ++++---- tests/Annotated/Fixtures/Fixtures26/CityTypecast.php | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Annotated/Fixtures/Fixtures26/City.php b/tests/Annotated/Fixtures/Fixtures26/City.php index ee0c6d0..ce13a29 100644 --- a/tests/Annotated/Fixtures/Fixtures26/City.php +++ b/tests/Annotated/Fixtures/Fixtures26/City.php @@ -13,13 +13,13 @@ private function __construct(string $value) $this->value = $value; } - public function __toString(): string + public static function fromString(string $value): self { - return $this->value; + return new self($value); } - public static function fromString(string $value): self + public function __toString(): string { - return new self($value); + return $this->value; } } diff --git a/tests/Annotated/Fixtures/Fixtures26/CityTypecast.php b/tests/Annotated/Fixtures/Fixtures26/CityTypecast.php index bdc8d8c..373526d 100644 --- a/tests/Annotated/Fixtures/Fixtures26/CityTypecast.php +++ b/tests/Annotated/Fixtures/Fixtures26/CityTypecast.php @@ -43,7 +43,7 @@ public function uncast(array $data): array continue; } - $data[$column] = (string)$value; + $data[$column] = (string) $value; } return $data; From 9d3ddca8b2810b99287d2d90eb62bf36639f0f1c Mon Sep 17 00:00:00 2001 From: Adam Dyson Date: Tue, 22 Jul 2025 16:13:54 +1000 Subject: [PATCH 3/3] Defined dependency on cycle/database 2.15 --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 9fd40ec..d14de0c 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,7 @@ ], "require": { "php": ">=8.1", + "cycle/database": "^2.15", "cycle/orm": "^2.9.2", "cycle/schema-builder": "^2.11.1", "spiral/attributes": "^2.8|^3.0",