This commit is contained in:
Alex
2025-07-23 09:01:48 +03:00
parent 69e1e73c07
commit 62c4b80fae
13 changed files with 632 additions and 3 deletions
+14
View File
@@ -20,4 +20,18 @@ final readonly class UpdateList extends AbstractModel
public ?int $marker,
) {
}
/**
* Overridden to prevent incorrect usage.
* UpdateList contains polymorphic objects and must be created via ModelFactory.
*
* @param array<string, mixed> $data
* @throws \LogicException Always.
*/
public static function fromArray(array $data): static
{
throw new \LogicException(
'Cannot create UpdateList directly from an array. Use ModelFactory::createUpdateList() instead.'
);
}
}