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 Deprecated: ... " #1454

Open
emresaracoglu opened this issue Apr 18, 2024 · 3 comments
Open

"PHP Deprecated: ... " #1454

emresaracoglu opened this issue Apr 18, 2024 · 3 comments
Labels

Comments

@emresaracoglu
Copy link

Hello,

I have recently seen the following error occur. I have updated the library with Composer but the same errors still occur. How can I solve it?

Thank you.

PHP 8.2

PHP Deprecated: Creation of dynamic property Longman\TelegramBot\Entities\ServerResponse::$ok is deprecated in /var/www/***/vendor/longman/telegram-bot/src/Entities/Entity.php on line 81; PHP message: PHP Deprecated: Creation of dynamic property Longman\TelegramBot\Entities\ServerResponse::$result is deprecated in /var/www/***/vendor/longman/telegram-bot/src/Entities/Entity.php on line 81; PHP message: PHP Deprecated: Creation of dynamic property Longman\TelegramBot\Entities\ServerResponse::$raw_data is deprecated in /var/www/***/vendor/longman/telegram-bot/src/Entities/Entity.php on line 81; PHP message: PHP Deprecated: Creation of dynamic property Longman\TelegramBot\Entities\ServerResponse::$bot_username is deprecated in /var/www/***/vendor/longman/telegram-bot/src/Entities/Entity.php on line 81" while reading response header from upstream, client: 23.88.105.37, server: example.com, request: "GET /wos/cron HTTP/1.1", upstream: "fastcgi://unix:/var/lib/php7.4-fpm/web3.sock:", host: "example.com"

@Hitmare
Copy link
Collaborator

Hitmare commented Apr 18, 2024

Hello

As far as i'm aware PHP 8.2 isn't fully supported yet. please use php 8.1 if you can. This bug is known and worked on.

@emresaracoglu
Copy link
Author

If it is a known bug and a solution is sought, I may need to close the topic. Thank you for your response

@dereuromark
Copy link

php: ['7.3', '7.4', '8.0', '8.1', '8.2', '8.3']

looks to me like a lie :)

After https://github.com/php-telegram-bot/core/blob/develop/phpunit.xml.dist#L13

It should never silence errors in test suite IMO

Also, this is an easy fix - after removing the silencing.
It can be fixed in a BC way by just adding the properties as expected by modern PHP

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

No branches or pull requests

3 participants