Closed eric2100 closed 5 years ago
Q | A |
---|---|
Bug? | yes |
New Feature? | no |
Framework | Laravel |
Framework version | 6.0.4 |
Package version | 2.3 |
PHP version | 7 |
I think you mean v2.4.0-rc1 not 2.3 ? Anyway, I will look into it.
@eric2100 I can't reproduce the problem you are describing, but I am just updating, haven't tried to install from scratch. So you previously did not have dingo in your project?.
Can I suggest you try this:
rm -rf vendor
composer clear-cache
composer install
composer require dingo/api
@eric2100 I can't reproduce the problem you are describing, but I am just updating, haven't tried to install from scratch. So you previously did not have dingo in your project?.
Can I suggest you try this:
rm -rf vendor composer clear-cache composer install composer require dingo/api
I still follow the instructions in your steps.
I have a package installed
composer require davejamesmiller/laravel-breadcrumbs
composer require barryvdh/laravel-cors
composer require barryvdh/laravel-ide-helper
composer require intervention/image
composer require spatie/laravel-permission
composer require jenssegers/agent
composer require laravelcollective/html
composer require romanzipp/laravel-validator-pizza
composer require torann/geoip
composer require recca0120/laravel-tracy
composer require uepg/laravel-sybase
composer require irazasyed/telegram-bot-sdk
error message
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
- Installing league/fractal (0.17.0): Downloading (100%)
- Installing doctrine/annotations (v1.7.0): Downloading (100%)
- Installing dingo/blueprint (v0.3.0): Downloading (100%)
- Installing dingo/api (v2.4.0-rc2): Downloading (100%)
league/fractal suggests installing pagerfanta/pagerfanta (Pagerfanta Paginator)
league/fractal suggests installing zendframework/zend-paginator (Zend Framework Paginator)
dingo/api suggests installing tymon/jwt-auth (Protect your API with JSON Web Tokens.)
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Symfony\Component\Debug\Exception\FatalThrowableError : Argument 1 passed to Dingo\Api\Http\Response::setFormatters() must be of the type array, null given, called in /home/www3/public_html/vendor/dingo/api/src/Provider/DingoServiceProvider.php on line 34
at /home/www3/public_html/vendor/dingo/api/src/Http/Response.php:257
253| * @param array $formatters
254| *
255| * @return void
256| */
> 257| public static function setFormatters(array $formatters)
258| {
259| static::$formatters = $formatters;
260| }
261|
Exception trace:
1 Dingo\Api\Http\Response::setFormatters()
/home/www3/public_html/vendor/dingo/api/src/Provider/DingoServiceProvider.php:34
2 Dingo\Api\Provider\DingoServiceProvider::setResponseStaticInstances()
/home/www3/public_html/vendor/dingo/api/src/Provider/DingoServiceProvider.php:23
Please use the argument -v to see more details.
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1
Installation failed, reverting ./composer.json to its original content.
The new installation of laravel 6, the packager is installed normally.
please solve this error
@Ravisondagar If there is an issue, it's inside your composer.json file, not this library