Closed fcorz closed 5 years ago
Here are the relevant areas from Laravels upgrade guide. https://laravel.com/docs/5.8/upgrade#exception-handling
This error is only the first in a number of them that we'll experience using Laravel 5.8. I've updated the PR to address all the errors - however, even with those, this isn't fixing the builds since the tests require Lumen and Lumen hasn't been released for 5.8 yet.
Resolved, I will tag this as 2.1
update the package version (Y) "dingo/api": "^2.1",
@SOSTheBlack ? Do you want to elaborate what you mean there?
@specialtactics Add this in your composer.json file "require": { "php": ">=7.1.3", "dingo/api": "^2.1", ...
@SOSTheBlack Are you saying you are having issues still? If so, please post your complete composer.json file, because I cannot reproduce.
@specialtactics
This is the error message I receive when I run composer update: PHP Fatal error: Class App\Exceptions\Api\Handler contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Illuminate\Contracts\Debug\ExceptionHandler::shouldReport) in /Users/dev/Web/laravel58/app/Exceptions/Api/Handler.php on line 33
In Handler.php line 33:
Class App\Exceptions\Api\Handler contains 1 abstract method and must theref
ore be declared abstract or implement the remaining methods (Illuminate\Con
tracts\Debug\ExceptionHandler::shouldReport)
Here is my composer.json:
{ "name": "My Test API", "description": "Starter Boiler Plate", "keywords": ["REST API", "laravel"], "license": "MIT", "type": "project", "require": { "php": ">=7.1.3", "laravel/framework": "^5.8", "dingo/api": "^2.1", "tymon/jwt-auth": "^0.5", "stevenmaguire/laravel-middleware-csp": "^0.1.1", "prettus/laravel-validation": "^1.1", "illuminate/support": "^5.3", "darkaonline/l5-swagger": "^5.8" }, "require-dev": { "fzaninotto/faker": "^1.4", "mockery/mockery": "^0.9", "symfony/css-selector": "^3.1", "symfony/dom-crawler": "^3.1", "barryvdh/laravel-debugbar": "^3.2" }, "autoload": { "classmap": [ "database", "app/Models/User", "app/Models/Locality", "app/Models/Contents", "app/Models/System", "app/Models/Notifications", "app/Facades", "app/Repository", "app/Services" ], "psr-4": { "App\": "app/" } }, "autoload-dev": { "classmap": [ "tests/TestCase.php" ] }, "scripts": { "post-root-package-install": [ "php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "php artisan key:generate" ], "post-install-cmd": [ "Illuminate\Foundation\ComposerScripts::postInstall", "php artisan optimize" ], "post-update-cmd": [ "Illuminate\Foundation\ComposerScripts::postUpdate", "php artisan optimize" ] }, "config": { "preferred-install": "dist" } }
@soumyaRauth that composer file works fine for me.
Also, the file "App\Exceptions\Api\Handler" is actually inside of your own application - not dingo or any other package, so I suspect the problem lies in your own code.
laravel-framework file
namespace Illuminate\Contracts\Debug
has upgrade , this interface add this functionpublic function shouldReport(Exception $e);
but This interface is not implemented please check and fix it. thx.