From 5faf9303d788851a5d977db483b15cbf176a6d30 Mon Sep 17 00:00:00 2001 From: digitalroll <103197016+digitalroll@users.noreply.github.com> Date: Tue, 21 Jun 2022 12:37:36 +0200 Subject: [PATCH 1/4] Laravel 9 support --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 73b13bf..7ebf31b 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ ] }, "require": { - "laravel/framework": "~7.0|~8.0" + "laravel/framework": "~7.0|~8.0|~9.0" }, "require-dev": { "mockery/mockery": "1.3.*", From 1b207e715b283e6fb71c1376c8aa80f158fd022c Mon Sep 17 00:00:00 2001 From: "andreas.roll" Date: Tue, 21 Jun 2022 12:51:22 +0200 Subject: [PATCH 2/4] Add description --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 7ebf31b..b9d0837 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,6 @@ { "name": "optimus/heimdal", + "description": "Laravel 9 support", "autoload": { "psr-4": { "Optimus\\Heimdal\\": "src/" From b9ffeecd3aec618fe66e501112eacc921d2f6347 Mon Sep 17 00:00:00 2001 From: "andreas.roll" Date: Tue, 21 Jun 2022 12:58:06 +0200 Subject: [PATCH 3/4] New name --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index b9d0837..94b9272 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { - "name": "optimus/heimdal", + "name": "digitalroll/heimdal", "description": "Laravel 9 support", "autoload": { "psr-4": { - "Optimus\\Heimdal\\": "src/" + "Digitalroll\\Heimdal\\": "src/" } }, "autoload-dev": { From 0ecc8938ecc75809d17688195c6c165f338192f4 Mon Sep 17 00:00:00 2001 From: "andreas.roll" Date: Tue, 21 Jun 2022 13:17:59 +0200 Subject: [PATCH 4/4] Changed namespaces --- src/ExceptionHandler.php | 8 ++++---- src/Formatters/BaseFormatter.php | 2 +- src/Formatters/ExceptionFormatter.php | 4 ++-- src/Formatters/HttpExceptionFormatter.php | 4 ++-- .../UnprocessableEntityHttpExceptionFormatter.php | 4 ++-- src/Provider/LaravelServiceProvider.php | 8 ++++---- src/Reporters/BugsnagReporter.php | 2 +- src/Reporters/ReporterInterface.php | 2 +- src/Reporters/RollbarReporter.php | 2 +- src/Reporters/SentryReporter.php | 4 ++-- src/ResponseFactory.php | 2 +- src/config/optimus.heimdal.php | 6 +++--- tests/ExceptionHandlerTest.php | 4 ++-- tests/Formatters/ExceptionFormatterTest.php | 4 ++-- tests/Formatters/HttpExceptionFormatterTest.php | 6 +++--- .../UnprocessableEntityHttpExceptionFormatterTest.php | 4 ++-- tests/Reporters/BugsnagReporterTest.php | 2 +- tests/ResponseFactoryTest.php | 2 +- tests/helpers.php | 2 +- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/src/ExceptionHandler.php b/src/ExceptionHandler.php index b8d7d96..c7f0b1a 100644 --- a/src/ExceptionHandler.php +++ b/src/ExceptionHandler.php @@ -1,14 +1,14 @@ config['add_cors_headers']) { if (!class_exists(CorsService::class)) { throw new InvalidArgumentException( - 'asm89/stack-cors has not been installed. Optimus\Heimdal needs it for adding CORS headers to response.' + 'asm89/stack-cors has not been installed. Digitalroll\Heimdal needs it for adding CORS headers to response.' ); } diff --git a/src/Formatters/BaseFormatter.php b/src/Formatters/BaseFormatter.php index 61e94d2..55f2cb9 100644 --- a/src/Formatters/BaseFormatter.php +++ b/src/Formatters/BaseFormatter.php @@ -1,6 +1,6 @@ false, @@ -13,11 +13,11 @@ Throwable::class => Formatters\ExceptionFormatter::class, ], - 'response_factory' => \Optimus\Heimdal\ResponseFactory::class, + 'response_factory' => \Digitalroll\Heimdal\ResponseFactory::class, 'reporters' => [ /*'sentry' => [ - 'class' => \Optimus\Heimdal\Reporters\SentryReporter::class, + 'class' => \Digitalroll\Heimdal\Reporters\SentryReporter::class, 'config' => [ 'dsn' => '', // For extra options see https://docs.sentry.io/clients/php/config/ diff --git a/tests/ExceptionHandlerTest.php b/tests/ExceptionHandlerTest.php index e5ceb7b..45541e4 100644 --- a/tests/ExceptionHandlerTest.php +++ b/tests/ExceptionHandlerTest.php @@ -2,8 +2,8 @@ use Illuminate\Http\Request; use Illuminate\Http\JsonResponse; -use Optimus\Heimdal\ExceptionHandler; -use Optimus\Heimdal\Formatters\BaseFormatter; +use Digitalroll\Heimdal\ExceptionHandler; +use Digitalroll\Heimdal\Formatters\BaseFormatter; use Orchestra\Testbench\TestCase; use Symfony\Component\HttpKernel\Exception\HttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; diff --git a/tests/Formatters/ExceptionFormatterTest.php b/tests/Formatters/ExceptionFormatterTest.php index 253ec22..6d238d6 100644 --- a/tests/Formatters/ExceptionFormatterTest.php +++ b/tests/Formatters/ExceptionFormatterTest.php @@ -1,7 +1,7 @@