1 | <?php |
||
8 | class Handler extends ExceptionHandler |
||
9 | { |
||
10 | /** |
||
11 | * A list of the exception types that should not be reported. |
||
12 | * |
||
13 | * @var array |
||
14 | */ |
||
15 | protected $dontReport = [ |
||
16 | 'Symfony\Component\HttpKernel\Exception\HttpException', |
||
17 | ]; |
||
18 | |||
19 | /** |
||
20 | * Report or log an exception. |
||
21 | * |
||
22 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
||
23 | * |
||
24 | * @param \Exception $e |
||
25 | */ |
||
26 | public function report(Exception $e) |
||
30 | |||
31 | /** |
||
32 | * Render an exception into an HTTP response. |
||
33 | * |
||
34 | * @param \Illuminate\Http\Request $request |
||
35 | * @param \Exception $e |
||
36 | * |
||
37 | * @return \Illuminate\Http\Response |
||
38 | */ |
||
39 | public function render($request, Exception $e) |
||
47 | } |
||
48 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.