php-debugbar
php-debugbar copied to clipboard
Type error: Argument 1 passed to DebugBar\DataCollector\ExceptionsCollector::addException() must be an instance of Exception, instance of ParseError given
I'm using this library through barryvdh/laravel-debugbar in a Laravel project.
The problem was a missing semicolon in a Request class. Here is the error it raised:
Type error: Argument 1 passed to DebugBar\DataCollector\ExceptionsCollector::addException() must be an instance of Exception, instance of ParseError given, called in vendor/maximebf/debugbar/src/DebugBar/DataCollector/ExceptionsCollector.php on line 32
Details
PHP Debugbar version: 1.11.1 Laravel Debugbar version: 2.2.2 Laravel version: 5.2.41 PHP version: 7.0.5-2+deb.sury.org~trusty+1
Yeah we should update it to Throwable here: https://github.com/barryvdh/laravel-debugbar/blob/4e0e81e1b40616825556eeed6367cebe7e532622/src/LaravelDebugbar.php#L448 As implemented here: https://github.com/maximebf/php-debugbar/commit/7c62c30a1ec09f1eac3813b1f050dbc5cc475a51