From 45247f6969ee07de2eb5477923f1b0a33e718ee6 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Fri, 19 Sep 2025 15:59:47 +0200 Subject: [PATCH 1/5] feat: migrate to f4 --- composer.json | 7 +++---- src/Admin/Filament/Clusters/Settings.php | 2 +- src/CommonPlugin.php | 3 ++- src/Foundation/Plugins/Plugin.php | 3 ++- src/Providers/GlobalSearchProvider.php | 2 +- tests/Pest.php | 1 - tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php | 3 ++- workbench/database/factories/UserFactory.php | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/composer.json b/composer.json index b963a9c..348a13b 100644 --- a/composer.json +++ b/composer.json @@ -40,15 +40,14 @@ }, "require": { "php": "^8.2", - "bezhansalleh/filament-shield": "^3.3", + "bezhansalleh/filament-shield": "^4.0", "datalinx/php-utils": "^2.5", - "filament/filament": "^3.3", - "filament/spatie-laravel-settings-plugin": "^3.3", + "filament/filament": "^4.0", + "filament/spatie-laravel-settings-plugin": "^4.0", "laravel/scout": "^10.14", "spatie/laravel-package-tools": "^1.19" }, "require-dev": { - "eclipsephp/catalogue-plugin": "dev-main", "laravel/pint": "^1.21", "orchestra/testbench": "^10.1", "pestphp/pest": "^3.7", diff --git a/src/Admin/Filament/Clusters/Settings.php b/src/Admin/Filament/Clusters/Settings.php index ff894c2..65c2768 100644 --- a/src/Admin/Filament/Clusters/Settings.php +++ b/src/Admin/Filament/Clusters/Settings.php @@ -6,7 +6,7 @@ class Settings extends Cluster { - protected static ?string $navigationIcon = 'heroicon-o-cog-6-tooth'; + protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-cog-6-tooth'; public static function getNavigationLabel(): string { diff --git a/src/CommonPlugin.php b/src/CommonPlugin.php index 3288d92..18502e2 100644 --- a/src/CommonPlugin.php +++ b/src/CommonPlugin.php @@ -2,9 +2,10 @@ namespace Eclipse\Common; +use Eclipse\Common\Foundation\Plugins\Plugin; use Eclipse\Common\Admin\Filament\Clusters\Settings; -class CommonPlugin extends Foundation\Plugins\Plugin +class CommonPlugin extends Plugin { /** * Cluster that is used for grouping app and plugin settings diff --git a/src/Foundation/Plugins/Plugin.php b/src/Foundation/Plugins/Plugin.php index 1e07385..684a769 100644 --- a/src/Foundation/Plugins/Plugin.php +++ b/src/Foundation/Plugins/Plugin.php @@ -2,6 +2,7 @@ namespace Eclipse\Common\Foundation\Plugins; +use Exception; use Filament\Panel; use Illuminate\Support\Str; use ReflectionClass; @@ -36,7 +37,7 @@ public function __construct() /** * Register any plugin services. * - * @throws \Exception + * @throws Exception */ public function register(Panel $panel): void { diff --git a/src/Providers/GlobalSearchProvider.php b/src/Providers/GlobalSearchProvider.php index 2f7fe89..e334d14 100644 --- a/src/Providers/GlobalSearchProvider.php +++ b/src/Providers/GlobalSearchProvider.php @@ -10,7 +10,7 @@ /** * Global search provider that uses Laravel Scout for resources/models that implement it */ -class GlobalSearchProvider implements \Filament\GlobalSearch\Contracts\GlobalSearchProvider +class GlobalSearchProvider implements \Filament\GlobalSearch\Providers\Contracts\GlobalSearchProvider { public function getResults(string $query): ?GlobalSearchResults { diff --git a/tests/Pest.php b/tests/Pest.php index 34e804d..f464441 100644 --- a/tests/Pest.php +++ b/tests/Pest.php @@ -22,7 +22,6 @@ '--all' => null, '--panel' => 'admin', '--option' => 'permissions', - '--minimal' => null, ]); }) ->in(__DIR__); diff --git a/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php b/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php index dacceca..5b65088 100644 --- a/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php +++ b/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php @@ -1,5 +1,5 @@ where('id', $group->id)->count())->toBe(1); }); +*/ \ No newline at end of file diff --git a/workbench/database/factories/UserFactory.php b/workbench/database/factories/UserFactory.php index dfcab01..8a58e9e 100644 --- a/workbench/database/factories/UserFactory.php +++ b/workbench/database/factories/UserFactory.php @@ -10,7 +10,7 @@ /** * @template TModel of \Workbench\App\Models\User * - * @extends \Illuminate\Database\Eloquent\Factories\Factory + * @extends Factory */ class UserFactory extends Factory { From d780f38c2a78f9403bab453b7dba650c4bb723fc Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Mon, 22 Sep 2025 15:51:48 +0200 Subject: [PATCH 2/5] chore: re-add catalogue plugin --- composer.json | 14 +++++++++++++- .../Foundation/Models/Scopes/ActiveScopeTest.php | 3 +-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 348a13b..c2980e2 100644 --- a/composer.json +++ b/composer.json @@ -48,11 +48,22 @@ "spatie/laravel-package-tools": "^1.19" }, "require-dev": { + "eclipsephp/catalogue-plugin": "dev-f4@dev", "laravel/pint": "^1.21", "orchestra/testbench": "^10.1", "pestphp/pest": "^3.7", "pestphp/pest-plugin-livewire": "^3.0" }, + "repositories": [ + { + "type": "vcs", + "url": "https://github.com/KilianTrunk/eclipsephp-catalogue-plugin.git" + }, + { + "type": "vcs", + "url": "https://github.com/KilianTrunk/eclipsephp-world-plugin.git" + } + ], "scripts": { "post-autoload-dump": [ "@clear", @@ -82,5 +93,6 @@ "Eclipse\\Common\\CommonServiceProvider" ] } - } + }, + "version": "dev-f4" } diff --git a/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php b/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php index 5b65088..dacceca 100644 --- a/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php +++ b/tests/Unit/Foundation/Models/Scopes/ActiveScopeTest.php @@ -1,5 +1,5 @@ where('id', $group->id)->count())->toBe(1); }); -*/ \ No newline at end of file From b25e7a8208282ba52dadd5b487cb3ea6d4f82b20 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Tue, 23 Sep 2025 14:49:20 +0200 Subject: [PATCH 3/5] chore: format --- src/Admin/Filament/Clusters/Settings.php | 2 +- src/CommonPlugin.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Admin/Filament/Clusters/Settings.php b/src/Admin/Filament/Clusters/Settings.php index 65c2768..d3897b3 100644 --- a/src/Admin/Filament/Clusters/Settings.php +++ b/src/Admin/Filament/Clusters/Settings.php @@ -6,7 +6,7 @@ class Settings extends Cluster { - protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-cog-6-tooth'; + protected static string|\BackedEnum|null $navigationIcon = 'heroicon-o-cog-6-tooth'; public static function getNavigationLabel(): string { diff --git a/src/CommonPlugin.php b/src/CommonPlugin.php index 18502e2..e4a42c1 100644 --- a/src/CommonPlugin.php +++ b/src/CommonPlugin.php @@ -2,8 +2,8 @@ namespace Eclipse\Common; -use Eclipse\Common\Foundation\Plugins\Plugin; use Eclipse\Common\Admin\Filament\Clusters\Settings; +use Eclipse\Common\Foundation\Plugins\Plugin; class CommonPlugin extends Plugin { From 7e2dbcfc0ace347e48e959a6e0390589e4338edf Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Thu, 25 Sep 2025 10:49:22 +0200 Subject: [PATCH 4/5] chore: remove fork reference --- composer.json | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/composer.json b/composer.json index c2980e2..960e024 100644 --- a/composer.json +++ b/composer.json @@ -48,22 +48,12 @@ "spatie/laravel-package-tools": "^1.19" }, "require-dev": { - "eclipsephp/catalogue-plugin": "dev-f4@dev", + "eclipsephp/catalogue-plugin": "dev-main", "laravel/pint": "^1.21", "orchestra/testbench": "^10.1", "pestphp/pest": "^3.7", "pestphp/pest-plugin-livewire": "^3.0" }, - "repositories": [ - { - "type": "vcs", - "url": "https://github.com/KilianTrunk/eclipsephp-catalogue-plugin.git" - }, - { - "type": "vcs", - "url": "https://github.com/KilianTrunk/eclipsephp-world-plugin.git" - } - ], "scripts": { "post-autoload-dump": [ "@clear", @@ -93,6 +83,5 @@ "Eclipse\\Common\\CommonServiceProvider" ] } - }, - "version": "dev-f4" + } } From abf03142af4295a888204a431d6d0d51e40d1d25 Mon Sep 17 00:00:00 2001 From: Kilian Trunk Date: Sun, 5 Oct 2025 14:53:25 +0200 Subject: [PATCH 5/5] ci: run tests for forks --- .github/workflows/test-runner.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test-runner.yml b/.github/workflows/test-runner.yml index 4a1f073..9c79951 100644 --- a/.github/workflows/test-runner.yml +++ b/.github/workflows/test-runner.yml @@ -1,15 +1,13 @@ name: Tests on: - # Run testing on all push and pull requests for the main branch that have committed changes in PHP files + # Run testing on all push and pull requests that have committed changes in PHP files push: - branches: [ "main" ] paths: - - '**.php' + - '**/*.php' pull_request: - branches: [ "main" ] paths: - - '**.php' + - '**/*.php' # Make it possible to run the workflow manually workflow_dispatch: