irazasyed / telegram-bot-sdk

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
https://telegram-bot-sdk.com
BSD 3-Clause "New" or "Revised" License
3.03k stars 670 forks source link

Post installation issue #754

Closed jahanzaibbahadur closed 4 years ago

jahanzaibbahadur commented 4 years ago

Symfony\Component\Debug\Exception\FatalThrowableError : Argument 1 passed to Telegram\Bot\BotsManager::__construct() must be of the type array, null given, called in \vendor\irazasyed\telegram-bot-sdk\src\Laravel\TelegramServiceProvider.php on line 65

at \vendor\irazasyed\telegram-bot-sdk\src\BotsManager.php:29 25| TelegramManager constructor. 26| 27| @param array $config 28| /

29| public function __construct(array $config) 30| { 31| $this->config = $config; 32| } 33|

Exception trace:

1 Telegram\Bot\BotsManager::__construct() \vendor\irazasyed\telegram-bot-sdk\src\Laravel\TelegramServiceProvider.php:65

2 Telegram\Bot\Laravel\TelegramServiceProvider::Telegram\Bot\Laravel{closure}(Object(Illuminate\Foundation\Application), []) \vendor\laravel\framework\src\Illuminate\Container\Container.php:799

Please use the argument -v to see more details.

sergeyshpota commented 4 years ago

The same issue for me

meediewow commented 4 years ago

+1

sigurniv commented 4 years ago

for anyone struggling with this - don't forget to do artisan config:clear before requiring this package.

593software commented 3 years ago
  1. composer remove irazasyed/telegram-bot-sdk
  2. php artisan config:cache
  3. composer require irazasyed/telegram-bot-sdk