mariosimao / notion-sdk-php

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

[BUG] #387

Closed RostyslavYakuts closed 2 months ago

RostyslavYakuts commented 2 months ago

Mistake in documentation: https://mariosimao.github.io/notion-sdk-php/getting-started.html <?php

require "vendor/autoload.php";

use Notion\Notion;

$token = "secret_token"; $notion = Notion::create($token);

$users = $notion->users()->findAll();

foreach ($users as $user) { echo $user->name . PHP_EOL; } echo $user->name leads to fatal error Cannot access private property Notion\Users\User::$name Your property in class User: private string $name;

mariosimao commented 2 months ago

Hello @RostyslavYakuts!

What version of the library are you using?

RostyslavYakuts commented 2 months ago

Hi @mariosimao `composer require mariosimao/notion-sdk-php Using version ^0.6.2 for mariosimao/notion-sdk-php ./composer.json has been updated Running composer update mariosimao/notion-sdk-php Loading composer repositories with package information Updating dependencies Lock file operations: 1 install, 0 updates, 0 removals

mariosimao commented 2 months ago

Hello @RostyslavYakuts the documentation refers to the latest version of the SDK: v1.14.0

You are using a 2-year-old version which is no longer supported. I strongly recommend updating it.

RostyslavYakuts commented 2 months ago

ok, thanks