Skip to content

Commit 9e516be

Browse files
Merge pull request #57403 from nextcloud/followup/noid/snowflake-entity
fix(snowflake): Allow SnowflakeAware to overwrite the field types
2 parents 6b6deef + 2bd2cc7 commit 9e516be

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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)