Skip to content

Commit 3372ed6

Browse files
authored
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
1 parent 814b36a commit 3372ed6

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

.github/workflows/run-integration-tests.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,12 @@ jobs:
1919
strategy:
2020
matrix:
2121
php: [8.0, 7.4, 7.3, 7.2]
22-
lumen: [8.*, 7.*, 6.*]
22+
lumen: [8.*, 7.*]
2323
exclude:
2424
- lumen: 8.*
2525
php: 7.2
2626
- lumen: 7.*
2727
php: 8.0
28-
- lumen: 6.*
29-
php: 8.0
3028
name: P${{ matrix.php }} - Lumen${{ matrix.lumen }}
3129
steps:
3230
- name: Checkout code
@@ -69,7 +67,7 @@ jobs:
6967
strategy:
7068
matrix:
7169
php: [8.0, 7.4, 7.3, 7.2]
72-
laravel: [8.*, 7.*, 6.*]
70+
laravel: [8.*, 7.*]
7371
exclude:
7472
- laravel: 8.*
7573
php: 7.2

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
php: [8.0, 7.4, 7.3, 7.2]
23-
laravel: [9.*, 8.*, 6.*, 7.*]
23+
laravel: [9.*, 8.*, 7.*]
2424
dependency-version: [prefer-lowest, prefer-stable]
2525
exclude:
2626
- laravel: 8.*

composer.json

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,16 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=7.2",
13+
"php": ">=7.2.5",
1414
"maximebf/debugbar": "^1.17.2",
15-
"illuminate/routing": "^6|^7|^8|^9",
16-
"illuminate/session": "^6|^7|^8|^9",
17-
"illuminate/support": "^6|^7|^8|^9",
18-
"symfony/debug": "^4.3|^5|^6",
19-
"symfony/finder": "^4.3|^5|^6"
15+
"illuminate/routing": "^7|^8|^9",
16+
"illuminate/session": "^7|^8|^9",
17+
"illuminate/support": "^7|^8|^9",
18+
"symfony/finder": "^5|^6"
2019
},
2120
"require-dev": {
2221
"mockery/mockery": "^1.3.3",
23-
"orchestra/testbench-dusk": "^4|^5|^6|^7",
22+
"orchestra/testbench-dusk": "^5|^6|^7",
2423
"phpunit/phpunit": "^8.5|^9.0",
2524
"squizlabs/php_codesniffer": "^3.5"
2625
},

src/Middleware/InjectDebugbar.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
namespace Barryvdh\Debugbar\Middleware;
44

5-
use Error;
65
use Closure;
76
use Exception;
87
use Illuminate\Http\Request;
98
use Barryvdh\Debugbar\LaravelDebugbar;
109
use Illuminate\Contracts\Container\Container;
1110
use Illuminate\Contracts\Debug\ExceptionHandler;
12-
use Symfony\Component\Debug\Exception\FatalThrowableError;
11+
use Throwable;
1312

1413
class InjectDebugbar
1514
{
@@ -65,10 +64,7 @@ public function handle($request, Closure $next)
6564
try {
6665
/** @var \Illuminate\Http\Response $response */
6766
$response = $next($request);
68-
} catch (Exception $e) {
69-
$response = $this->handleException($request, $e);
70-
} catch (Error $error) {
71-
$e = new FatalThrowableError($error);
67+
} catch (Throwable $e) {
7268
$response = $this->handleException($request, $e);
7369
}
7470

@@ -84,11 +80,11 @@ public function handle($request, Closure $next)
8480
* (Copy from Illuminate\Routing\Pipeline by Taylor Otwell)
8581
*
8682
* @param $passable
87-
* @param Exception $e
83+
* @param Throwable $e
8884
* @return mixed
8985
* @throws Exception
9086
*/
91-
protected function handleException($passable, Exception $e)
87+
protected function handleException($passable, $e)
9288
{
9389
if (! $this->container->bound(ExceptionHandler::class) || ! $passable instanceof Request) {
9490
throw $e;

0 commit comments

Comments
 (0)