php-telegram-bot / core

PHP Telegram Bot based on the official Telegram Bot API
MIT License
3.87k stars 951 forks source link

PHP Fatal error: Class 'Longman\TelegramBot\Entities\ReplyKeyboardMarkup' not found #335

Closed dzarezenko closed 7 years ago

dzarezenko commented 7 years ago

Hi,

I have received "PHP Fatal error: Class 'Longman\TelegramBot\Entities\ReplyKeyboardMarkup' not found" error after migration from v0.35 to v0.36. And now I can't find this class at all. How can I fix my code without serious refactoring?

noplanman commented 7 years ago

Hi @dzarezenko

0.36 has a lot of new code, especially concerning the Entities.

I've written a short wiki entry about migrating from 0.35.

It's not that exhaustive and it contains just the main changes, so you might run in to other errors as you refactor. It shouldn't be too crazy and you can check the example/predefined commands to see how the new Entites / InlineQuery / Keyboard / InputMessageContent classes are used.

If you need any further assistance, please write. Also, feel free to adjust the wiki as you're refactoring 👍

dzarezenko commented 7 years ago

Thanks @noplanman

I just replaced Longman\TelegramBot\Entities\ReplyKeyboardMarkup with Longman\TelegramBot\Entities\Keyboard and all works now.

noplanman commented 7 years ago

Ok 👍

Just make sure to test all your custom commands, to be safe.