配置lumen dingo 时出现Fatal error: Class Dingo\Api\Exception\Handler contains 1 abstract method and must


序言:使用lumen时,配置dingo包时出现Fatal error: Class Dingo\Api\Exception\Handler contains 1 abstract method and must therefore be declared abstrac
t or implement the remaining methods (Illuminate\Contracts\Debug\ExceptionHandler::shouldReport) in F:\project\Doing\data\vendor\dingo\api\src\Exception\Handler.php on line 16

配置lumen dingo 时出现Fatal error: Class Dingo\Api\Exception\Handler contains 1 abstract method and must_第1张图片

原因:由于dingo的版本差异问题,导致一些抽象类和接口存在出入。

解决:在项目的composer.json中将dingo/api升级到最新版本:
“dingo/api”: “^2.1”
执行composer update

参考:https://github.com/dingo/api/issues/1633

你可能感兴趣的:(php后端,dingo,Fatal,error,laravel,lumen,api)