westacks / telebot

Easy way to create Telegram bots in PHP
https://westacks.github.io/telebot/
MIT License
282 stars 44 forks source link

Can't run 2.0 on PHP 7.4 #52

Closed artem-tverdokhlebov closed 2 years ago

artem-tverdokhlebov commented 2 years ago

First of all, I want to thank author for this great lib, you are truly awesome!

As I understood correctly, composer.json states that 2.0 supports PHP 7.4, but there are some features used in the code, that are available only on ^8.0. For example https://github.com/westacks/telebot/blob/master/src/Helpers/Type.php#L67 PHP 7.4 shows this error "Parse error: syntax error, unexpected '|', expecting variable (T_VARIABLE)"

Thank you for your work!

punyflash commented 2 years ago

Hello, yes, I kind of messed up support for older PHP versions when Travis CI was deleted, and I was lazy to run tests for older PHP manually. Also, the tests brake sometimes because Telegram stop accepting requests, as they are kind of bombarding their API with requests. I configured GitHub actions to run checks again in last update, and there are quite a work to do, and I slowly fixing it. The main focus for now is to make tests working again, so now I'm mostly trying to fix broken syntax and implement local testing system. Thanks for report!