From c45973da0ba96d47a97f6e94b8e1bd2ce56b4aec Mon Sep 17 00:00:00 2001 From: Baspa Date: Thu, 30 Jul 2026 09:22:03 +0200 Subject: [PATCH 1/2] build: restore larastan and phpstan extension-installer dev dependencies --- composer.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 6b5b4c7..5db3939 100644 --- a/composer.json +++ b/composer.json @@ -31,12 +31,15 @@ "backstage/laravel-mails": "self.version" }, "require-dev": { + "larastan/larastan": "^3.0", "laravel/pint": "^1.16", "nunomaduro/collision": "^8.8.0", "orchestra/testbench": "^9.0|^10.0", "pestphp/pest": "^3.7", "pestphp/pest-plugin-arch": "^3.1.0", - "pestphp/pest-plugin-laravel": "^3.0" + "pestphp/pest-plugin-laravel": "^3.0", + "phpstan/extension-installer": "^1.3", + "phpstan/phpstan-deprecation-rules": "^2.0" }, "autoload": { "psr-4": { @@ -81,4 +84,4 @@ "url": "git@github.com:backstagephp/laravel-mails.git" } } -} \ No newline at end of file +} From 27e7554bec614b0c4aedc5786bdfe20a7c0dca6e Mon Sep 17 00:00:00 2001 From: Baspa Date: Thu, 30 Jul 2026 09:22:03 +0200 Subject: [PATCH 2/2] fix: add default arm to EventType badge colour matches EventType has 29 cases but the badge colour matches handled only 8 with no default arm, so any other event type threw UnhandledMatchError and 500'd the events pages. --- src/Resources/EventResource.php | 2 ++ src/Resources/MailResource.php | 1 + 2 files changed, 3 insertions(+) diff --git a/src/Resources/EventResource.php b/src/Resources/EventResource.php index cad0ca3..762a6b5 100644 --- a/src/Resources/EventResource.php +++ b/src/Resources/EventResource.php @@ -98,6 +98,7 @@ public static function infolist(Schema $schema): Schema EventType::COMPLAINED => 'warning', EventType::UNSUBSCRIBED => 'danger', EventType::ACCEPTED => 'success', + default => 'gray', }) ->formatStateUsing(function (EventType $state) { return ucwords(str_replace('_', ' ', $state->value)); @@ -224,6 +225,7 @@ public static function table(Table $table): Table EventType::COMPLAINED => 'warning', EventType::UNSUBSCRIBED => 'danger', EventType::ACCEPTED => 'success', + default => 'gray', }) ->formatStateUsing(function (EventType $state) { return ucwords(str_replace('_', ' ', $state->value)); diff --git a/src/Resources/MailResource.php b/src/Resources/MailResource.php index ab6d281..f18deb4 100644 --- a/src/Resources/MailResource.php +++ b/src/Resources/MailResource.php @@ -231,6 +231,7 @@ public static function infolist(Schema $schema): Schema EventType::COMPLAINED => 'warning', EventType::UNSUBSCRIBED => 'danger', EventType::ACCEPTED => 'success', + default => 'gray', }) ->formatStateUsing(function (EventType $state) { return ucfirst($state->value);