Skip to content

Deprecated: Creation of dynamic property TelegramBot\Entities\InlineKeyboardButton #10

@essential-writer-codebase

Description

PHP 8.3

For example if y send this Request

        Request::sendMessage([
            'chat_id' => $chat_id,
            'parse_mode' => ParseMode::MARKDOWN,
            'text' => "test message",
            'reply_markup' => InlineKeyboard::make()->setKeyboard([
                [
                    InlineKeyboardButton::make->setText("test")->setSwitchInlineQuery($message)
                ]
            ])
        ]);

I haved this error:
Deprecated: Creation of dynamic property TelegramBot\Entities\InlineKeyboardButton::$text is deprecated

If i send this request with setText()

        Request::sendMessage([
            'chat_id' => $chat_id,
            'parse_mode' => ParseMode::MARKDOWN,
            'text' => "test message",
            'reply_markup' => InlineKeyboard::make()->setKeyboard([
                [
                    InlineKeyboardButton::make->setText("test")->setSwitchInlineQuery($message)
                ]

            ])
        ]);

I haved this error:
Fatal error: Uncaught TypeError: TelegramBot\CrashPad::sendCrash(): Argument #3 ($update) must be of type ?string, false given, called in /var/www/vendor/telegram-bot-php/core/src/CrashPad.php on line 29 and defined in /var/www/vendor/telegram-bot-php/core/src/CrashPad.php:72 Stack trace: #0 /var/www/vendor/telegram-bot-php/core/src/CrashPad.php(29): TelegramBot\CrashPad::sendCrash() #1 [internal function]: TelegramBot\CrashPad::TelegramBot{closure}() #2 {main} thrown in /var/www/vendor/telegram-bot-php/core/src/CrashPad.php on line 72

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy