Skip to content

Switch from #[AllowDynmicProperties] to __set method for data properties #1375

Closed
@jyxjjj

Description

@jyxjjj

🐞 Bug Report

Required Information

? !
Operating system Fedora 37
PHP Telegram Bot version 0.80.0
PHP version 8.2.0
MySQL version none
Update Method Webhook
Self-signed certificate yes
RAW update (if available)

Summary

Creation of dynamic property is deprecated

Current behaviour

$this->$key = $value;

[2022-12-07 10:53:35.971230]
channel=deprecations
level=WARNING
message=Creation of dynamic property Longman\TelegramBot\Entities\User::$id is deprecated in /www/wwwroot/TelegramBot/vendor/longman/telegram-bot/src/Entities/Entity.php on line 99
context=
extra=

How to reproduce

Use PHP 8.2.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions