Telegram-bot-sdk: Laravel 7 composer require irazasyed/telegram-bot-sdk error

Created on 25 Feb 2021  路  5Comments  路  Source: irazasyed/telegram-bot-sdk

Using version ^3.4 for irazasyed/telegram-bot-sdk
./composer.json has been updated
Running composer update irazasyed/telegram-bot-sdk
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals

  • Locking irazasyed/telegram-bot-sdk (v3.4.1)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Nothing to install, update or remove
    1 package suggestions were added by new dependencies, use composer suggest to see details.
    Package moontoast/math is abandoned, you should avoid using it. Use brick/math instead.
    Package fzaninotto/faker is abandoned, you should avoid using it. No replacement was suggested.
    Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested.
    Generating optimized autoload files
    composer/package-versions-deprecated: Generating version class...
    composer/package-versions-deprecated: ...done generating version class

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover --ansi

TypeError

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

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|

  +20 vendor frames

21 artisan:37
Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Most helpful comment

Hey guy,

You should clear your config cache manually by remove it at bootstrap/cache/config.php
Then everything will work!

All 5 comments

same error

run php artisan config:cache first, to clear config cache before that

same error:
laravel: 8.12
php 7.3

Hey guy,

You should clear your config cache manually by remove it at bootstrap/cache/config.php
Then everything will work!

Hey guy,

You should clear your config cache manually by remove it at bootstrap/cache/config.php
Then everything will work!

thanks @quangtam i removed config.php then everything well

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danilopinotti picture danilopinotti  路  3Comments

jobs2008 picture jobs2008  路  3Comments

realtebo picture realtebo  路  4Comments

maminbajand picture maminbajand  路  4Comments

iMohammadd picture iMohammadd  路  3Comments