zarincheg / telegram-bot-dialogs

The extension for Telegram Bot API PHP SDK that allows to implement dialogs in bots
MIT License
40 stars 29 forks source link

Error installing package on Laravel Framework 8.45.1 #18

Open denis660 opened 3 years ago

denis660 commented 3 years ago

An error occurs while installing the package

In BotsManager.php line 29:

  Argument 1 passed to Telegram\Bot\BotsManager::__construct() must be of the type array, null given, called in /var/www/...../vendor/irazasye
  d/telegram-bot-sdk/src/Laravel/TelegramServiceProvider.php on line 58

It was possible to install the package by correcting the line in file # 58 vendor/irazasyed/telegram-bot-sdk/src/Laravel/TelegramServiceProvider.php from return (new BotsManager(config('telegram')))->setContainer($app); on the return (new BotsManager(config('telegram',[])))->setContainer($app);

alies-dev commented 2 years ago

It's fixed on a fork: https://github.com/koot-labs/telegram-bot-dialogs (more stable, better docs, actively maintained)