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

PHP>=8.2 Creation of dynamic property is deprecated #164

Closed
divinity76 opened this issue Jan 26, 2024 · 4 comments · Fixed by #166
Closed

PHP>=8.2 Creation of dynamic property is deprecated #164

divinity76 opened this issue Jan 26, 2024 · 4 comments · Fixed by #166

Comments

@divinity76
Copy link

as of PHP8.2

Deprecated: Creation of dynamic property JoliCode\Slack\Api\Endpoint\ChatPostMessage::$formParameters is deprecated in /var/www/vendor/jolicode/slack-php-api/generated/Endpoint/ChatPostMessage.php on line 50

a quickfix would be to add

    /** @var array */
    public $formParameters = [];

to generated/Runtime/Client/EndpointTrait.php , but how to make the GENERATOR add that, i have no idea.

PR #161 tried to fix it (but did not address the generator issue)

@damienalexandre
Copy link
Member

This should be fixed with the latest release v4.7.0 🎉

@divinity76
Copy link
Author

@damienalexandre with just reading through the code, i fail to see how that update could have fixed it: JoliCode\Slack\Api\Endpoint\ChatPostMessage::formParameters still reference $this->formParameters which is not declared in any of generated/Endpoint/ChatPostMessage.php and generated/Runtime/Client/EndpointTrait.php and generated/Runtime/Client/Endpoint.php , am i missing something?

@damienalexandre
Copy link
Member

It can be seen here:

protected $formParameters = [];

@divinity76
Copy link
Author

somehow missed it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants