From 7716c6c3ef2643bef2f9dc2d5468f07f90921002 Mon Sep 17 00:00:00 2001 From: Niek Brekelmans Date: Thu, 18 Apr 2024 19:38:54 +0200 Subject: [PATCH 1/2] follow upgrade guide laravel data v3 to v4 --- src/Http/Controllers/WebhookController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Http/Controllers/WebhookController.php b/src/Http/Controllers/WebhookController.php index ad27144..be48f88 100644 --- a/src/Http/Controllers/WebhookController.php +++ b/src/Http/Controllers/WebhookController.php @@ -6,6 +6,7 @@ use EtsvThor\BifrostBridge\Jobs\ProcessWebhookBifrost; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; +use Spatie\LaravelData\DataCollection; class WebhookController { @@ -32,7 +33,7 @@ public function bifrost(Request $request): JsonResponse } ProcessWebhookBifrost::dispatch( - BifrostRoleData::collection($request->get('roles')), + BifrostRoleData::collect($request->get('roles'), DataCollection::class), ); return response()->json(['success' => true]); From 5a9731fe5dd45ea8aaafdad7f6b68f9adc8c6602 Mon Sep 17 00:00:00 2001 From: Niek Brekelmans Date: Thu, 18 Apr 2024 19:44:59 +0200 Subject: [PATCH 2/2] fix dependencies --- CHANGELOG.md | 4 ++++ composer.json | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 89ee631..58dcc90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # Changelog +## 1.0.1 +- Follow upgrade guide for laravel-data +- Drop support for laravel 9 +- Drop support for `spatie/laravel-data` v3 ## 1.0.0 - Support laravel 11 diff --git a/composer.json b/composer.json index e8c6313..0747dbe 100644 --- a/composer.json +++ b/composer.json @@ -15,9 +15,9 @@ "require": { "php": "~8.1.0 | ~8.2.0 | ~8.3.0", "spatie/laravel-permission": "^4.0 | ^5.0 | ^6.0", - "laravel/framework": "^9.0 | ^10.0 | ^11.0", + "laravel/framework": "^10.0 | ^11.0", "laravel/socialite": "^5.1", - "spatie/laravel-data": "^3.9 | ^4.0" + "spatie/laravel-data": "^4.0" }, "autoload": { "psr-4": {