Remove symfony/debug dependency (#1321)
* Migrate from symfony/debug to symfony/error-handler * Fix wrong version constraints * Remove Laravel 6 Support * Remove lumen 6 from test matrix * Remove symfony/error-handler
This commit is contained in:
parent
814b36a08a
commit
3372ed65e6
|
@ -19,14 +19,12 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
php: [8.0, 7.4, 7.3, 7.2]
|
||||
lumen: [8.*, 7.*, 6.*]
|
||||
lumen: [8.*, 7.*]
|
||||
exclude:
|
||||
- lumen: 8.*
|
||||
php: 7.2
|
||||
- lumen: 7.*
|
||||
php: 8.0
|
||||
- lumen: 6.*
|
||||
php: 8.0
|
||||
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
@ -69,7 +67,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
php: [8.0, 7.4, 7.3, 7.2]
|
||||
laravel: [8.*, 7.*, 6.*]
|
||||
laravel: [8.*, 7.*]
|
||||
exclude:
|
||||
- laravel: 8.*
|
||||
php: 7.2
|
||||
|
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
strategy:
|
||||
matrix:
|
||||
php: [8.0, 7.4, 7.3, 7.2]
|
||||
laravel: [9.*, 8.*, 6.*, 7.*]
|
||||
laravel: [9.*, 8.*, 7.*]
|
||||
dependency-version: [prefer-lowest, prefer-stable]
|
||||
exclude:
|
||||
- laravel: 8.*
|
||||
|
|
|
@ -10,17 +10,16 @@
|
|||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.2",
|
||||
"php": ">=7.2.5",
|
||||
"maximebf/debugbar": "^1.17.2",
|
||||
"illuminate/routing": "^6|^7|^8|^9",
|
||||
"illuminate/session": "^6|^7|^8|^9",
|
||||
"illuminate/support": "^6|^7|^8|^9",
|
||||
"symfony/debug": "^4.3|^5|^6",
|
||||
"symfony/finder": "^4.3|^5|^6"
|
||||
"illuminate/routing": "^7|^8|^9",
|
||||
"illuminate/session": "^7|^8|^9",
|
||||
"illuminate/support": "^7|^8|^9",
|
||||
"symfony/finder": "^5|^6"
|
||||
},
|
||||
"require-dev": {
|
||||
"mockery/mockery": "^1.3.3",
|
||||
"orchestra/testbench-dusk": "^4|^5|^6|^7",
|
||||
"orchestra/testbench-dusk": "^5|^6|^7",
|
||||
"phpunit/phpunit": "^8.5|^9.0",
|
||||
"squizlabs/php_codesniffer": "^3.5"
|
||||
},
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
|
||||
namespace Barryvdh\Debugbar\Middleware;
|
||||
|
||||
use Error;
|
||||
use Closure;
|
||||
use Exception;
|
||||
use Illuminate\Http\Request;
|
||||
use Barryvdh\Debugbar\LaravelDebugbar;
|
||||
use Illuminate\Contracts\Container\Container;
|
||||
use Illuminate\Contracts\Debug\ExceptionHandler;
|
||||
use Symfony\Component\Debug\Exception\FatalThrowableError;
|
||||
use Throwable;
|
||||
|
||||
class InjectDebugbar
|
||||
{
|
||||
|
@ -65,10 +64,7 @@ class InjectDebugbar
|
|||
try {
|
||||
/** @var \Illuminate\Http\Response $response */
|
||||
$response = $next($request);
|
||||
} catch (Exception $e) {
|
||||
$response = $this->handleException($request, $e);
|
||||
} catch (Error $error) {
|
||||
$e = new FatalThrowableError($error);
|
||||
} catch (Throwable $e) {
|
||||
$response = $this->handleException($request, $e);
|
||||
}
|
||||
|
||||
|
@ -84,11 +80,11 @@ class InjectDebugbar
|
|||
* (Copy from Illuminate\Routing\Pipeline by Taylor Otwell)
|
||||
*
|
||||
* @param $passable
|
||||
* @param Exception $e
|
||||
* @param Throwable $e
|
||||
* @return mixed
|
||||
* @throws Exception
|
||||
*/
|
||||
protected function handleException($passable, Exception $e)
|
||||
protected function handleException($passable, $e)
|
||||
{
|
||||
if (! $this->container->bound(ExceptionHandler::class) || ! $passable instanceof Request) {
|
||||
throw $e;
|
||||
|
|
Loading…
Reference in New Issue