diff --git a/.github/fixtures/laravel11-app-with-exceptions.php b/.github/fixtures/laravel11-app-with-exceptions.php new file mode 100644 index 00000000..a746cead --- /dev/null +++ b/.github/fixtures/laravel11-app-with-exceptions.php @@ -0,0 +1,20 @@ +withRouting( + web: __DIR__.'/../routes/web.php', + commands: __DIR__.'/../routes/console.php', + health: '/up', + ) + ->withMiddleware(function (Middleware $middleware) { + // + }) + ->withExceptions(function (Exceptions $exceptions) { + $exceptions->reportable(function (Throwable $e) { + $this->container->make(\Scoutapm\ScoutApmAgent::class)->recordThrowable($e); + }); + })->create(); diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 751dbe19..45b9fcd5 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -536,9 +536,12 @@ jobs: - name: "Configure error handler (Laravel 8)" if: matrix.laravel-version == '8.*' run: cd test-app && cp ../scout-apm-php/.github/fixtures/laravel8-exception-handler.php app/Exceptions/Handler.php - - name: "Configure error handler (Laravel 9)" + - name: "Configure error handler (Laravel 9-10)" if: matrix.laravel-version == '9.*' || matrix.laravel-version == '10.*' run: cd test-app && cp ../scout-apm-php/.github/fixtures/laravel9-exception-handler.php app/Exceptions/Handler.php + - name: "Configure error handler (Laravel 11)" + if: matrix.laravel-version == '11.*' + run: cd test-app && cp ../scout-apm-php/.github/fixtures/laravel11-app-with-exceptions.php bootstrap/app.php - name: "Add route to trigger error" run: cd test-app && echo -e "Route::get('/e', function () { throw new \RuntimeException('fail'); });" >> routes/web.php - name: "Configure Scout"