Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
utdrmac opened this issue Feb 2, 2024 · 2 comments
Open

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

utdrmac opened this issue Feb 2, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@utdrmac
Copy link

utdrmac commented Feb 2, 2024

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

@utdrmac utdrmac added the bug Something isn't working label Feb 2, 2024
@mariosimao
Copy link
Owner

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

@mariosimao mariosimao self-assigned this Feb 3, 2024
@utdrmac
Copy link
Author

utdrmac commented Feb 3, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants