Skip to content

Commit 2bd2cc7

Browse files
committed
fix(snowflake): Allow SnowflakeAware to overwrite the field types
Signed-off-by: Joas Schilling <[email protected]>
1 parent 40b79f5 commit 2bd2cc7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/public/AppFramework/Db/Entity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ abstract class Entity {
2222
public int|string|null $id = null;
2323
private array $_updatedFields = [];
2424
/** @psalm-param $_fieldTypes array<string, Types::*> */
25-
private array $_fieldTypes = ['id' => 'integer'];
25+
protected array $_fieldTypes = ['id' => 'integer'];
2626

2727
/**
2828
* Simple alternative constructor for building entities from a request

lib/public/AppFramework/Db/SnowflakeAwareEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ abstract class SnowflakeAwareEntity extends Entity {
2424
protected ?Snowflake $snowflake = null;
2525

2626
/** @psalm-param $_fieldTypes array<string, Types::*> */
27-
private array $_fieldTypes = ['id' => Types::STRING];
27+
protected array $_fieldTypes = ['id' => Types::STRING];
2828

2929
public function setId($id): void {
3030
throw new \LogicException('Use generated id to set a new id to the Snowflake aware entity.');

0 commit comments

Comments
 (0)