mirror of
https://github.com/nextcloud/server.git
synced 2026-02-03 20:41:22 -05:00
Merge pull request #57403 from nextcloud/followup/noid/snowflake-entity
fix(snowflake): Allow SnowflakeAware to overwrite the field types
This commit is contained in:
commit
9e516beb85
2 changed files with 2 additions and 2 deletions
|
|
@ -22,7 +22,7 @@ abstract class Entity {
|
|||
public int|string|null $id = null;
|
||||
private array $_updatedFields = [];
|
||||
/** @psalm-param $_fieldTypes array<string, Types::*> */
|
||||
private array $_fieldTypes = ['id' => 'integer'];
|
||||
protected array $_fieldTypes = ['id' => 'integer'];
|
||||
|
||||
/**
|
||||
* Simple alternative constructor for building entities from a request
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ abstract class SnowflakeAwareEntity extends Entity {
|
|||
protected ?Snowflake $snowflake = null;
|
||||
|
||||
/** @psalm-param $_fieldTypes array<string, Types::*> */
|
||||
private array $_fieldTypes = ['id' => Types::STRING];
|
||||
protected array $_fieldTypes = ['id' => Types::STRING];
|
||||
|
||||
public function setId($id): void {
|
||||
throw new \LogicException('Use generated id to set a new id to the Snowflake aware entity.');
|
||||
|
|
|
|||
Loading…
Reference in a new issue