From 8860f39b671282e08ee0fe9026914769aa761b38 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 30 Jan 2023 00:54:55 +0100 Subject: [PATCH 1/2] Laravel 10 changes --- README.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a1ac7001..88d0a58c 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ This is the official Laravel SDK for [Sentry](https://sentry.io/) ## Getting Started -The installation step below work on the latest versions of the Laravel framework (8.x and 9.x). +The installation step below works on the latest version of the Laravel framework (10.x). For other Laravel or Lumen versions see: -- [Laravel 8.x & 9.x](https://docs.sentry.io/platforms/php/guides/laravel/) +- [Laravel 8.x & 9.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel8-9) - [Laravel 6.x & 7.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel6-7/) - [Laravel 5.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel5/) - [Laravel 4.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel4/) @@ -42,7 +42,7 @@ Enable capturing unhandled exception to report to Sentry by making the following ```php {filename:App/Exceptions/Handler.php} use Sentry\Laravel\Integration; -public function register() +public function register(): void { $this->reportable(function (Throwable $e) { Integration::captureUnhandledException($e); @@ -69,10 +69,12 @@ SENTRY_LARAVEL_DSN=___PUBLIC_DSN___ ### Usage ```php +use function Sentry\captureException; + try { $this->functionFailsForSure(); } catch (\Throwable $exception) { - \Sentry\captureException($exception); + captureException($exception); } ``` @@ -82,10 +84,11 @@ try { The Laravel versions listed below are all currently supported: -- Laravel `>= 6.x.x` on PHP `>= 7.2` is supported starting from `1.2.0` -- Laravel `>= 7.x.x` on PHP `>= 7.2` is supported starting from `1.7.0` -- Laravel `>= 8.x.x` on PHP `>= 7.3` is supported starting from `1.9.0` +- Laravel `>= 10.x.x` on PHP `>= 8.1` is supported starting from `3.2.0` - Laravel `>= 9.x.x` on PHP `>= 8.0` is supported starting from `2.11.0` +- Laravel `>= 8.x.x` on PHP `>= 7.3` is supported starting from `1.9.0` +- Laravel `>= 7.x.x` on PHP `>= 7.2` is supported starting from `1.7.0` +- Laravel `>= 6.x.x` on PHP `>= 7.2` is supported starting from `1.2.0` Please note that starting with version `>= 2.0.0` we require PHP Version `>= 7.2` because we are using our new [PHP SDK](https://github.com/getsentry/sentry-php) underneath. From 18b8b087b0452fe0e5b6719882e67f71556bafa1 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Mon, 30 Jan 2023 12:40:12 +0100 Subject: [PATCH 2/2] Merge 8, 9 and 10 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 88d0a58c..341fa4df 100644 --- a/README.md +++ b/README.md @@ -19,11 +19,11 @@ This is the official Laravel SDK for [Sentry](https://sentry.io/) ## Getting Started -The installation step below works on the latest version of the Laravel framework (10.x). +The installation step below work on the latest versions of the Laravel framework (8.x, 9.x and 10.x). For other Laravel or Lumen versions see: -- [Laravel 8.x & 9.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel8-9) +- [Laravel 8.x & 9.x & 10.x](https://docs.sentry.io/platforms/php/guides/laravel/) - [Laravel 6.x & 7.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel6-7/) - [Laravel 5.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel5/) - [Laravel 4.x](https://docs.sentry.io/platforms/php/guides/laravel/other-versions/laravel4/)