mariosimao / notion-sdk-php

A complete Notion SDK for PHP developers.
https://mariosimao.github.io/notion-sdk-php/
MIT License
138 stars 24 forks source link

[BUG] Not all page properties have a static create function #339

Open utdrmac opened 5 months ago

utdrmac commented 5 months ago

Describe the bug Not all page properties have a static create function. The example in the documentation shows usage of ::create() to make each page property. https://mario.engineering/notion-sdk-php/page-properties/

RichText, for example, has no static create function.

Expected behavior It is expected that the code follows the documentation examples for all page property types

mariosimao commented 5 months ago

A simple IDE autocomplete should solve the discovery of available methods and properties.

The RichTextProperty has the following named constructors:

public static function fromText(RichText ...$texts): RichTextProperty
public static function fromString(string $text): RichTextProperty
public static function createEmpty(): RichTextProperty
utdrmac commented 5 months ago

Assumes I'm using an IDE. Simple popular code editors like Sublime, Notepadd++, BBEdit, etc don't have autocomplete functionality. Additionally, another assumption is I'm developing locally (required for IDE/autocomplete), which I'm not; I develop remotely through ssh to the webserver hosting the php code.