From 4c3d809f89910c0d2d8be55ea38623b9e3d43edb Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Sat, 11 Apr 2026 15:00:00 +0200 Subject: [PATCH] refactor(support): group Bouncer, Media, Setup files into subdirs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Finishes the Support/ consolidation pass: the three remaining root-level files get grouped into purpose-named subdirs, matching the shape the Pdf/, Hashids/, Update/, and Module/ subdirs took in the earlier sweep. - BouncerDefaultScope → Support/Bouncer/ (Bouncer-specific authorization scope) - CustomPathGenerator → Support/Media/ (Spatie MediaLibrary path generator — media config references it from config/media-library.php) - InstallWizardAuth → Support/Setup/ (folded into the existing Setup/ subdir alongside EnvironmentManager, FilePermissionChecker, InstallUtils, RequirementsChecker — it's install-wizard-flow state) 4 consumer files updated (AppServiceProvider, LoginController, UseInstallWizardTokenAuth middleware, config/media-library.php). app/Support/ root is now completely empty of standalone PHP files except helpers.php. --- app/Http/Controllers/Setup/LoginController.php | 2 +- app/Http/Middleware/UseInstallWizardTokenAuth.php | 2 +- app/Providers/AppServiceProvider.php | 4 ++-- app/Support/{ => Bouncer}/BouncerDefaultScope.php | 2 +- app/Support/{ => Media}/CustomPathGenerator.php | 2 +- app/Support/{ => Setup}/InstallWizardAuth.php | 2 +- config/media-library.php | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) rename app/Support/{ => Bouncer}/BouncerDefaultScope.php (96%) rename app/Support/{ => Media}/CustomPathGenerator.php (97%) rename app/Support/{ => Setup}/InstallWizardAuth.php (93%) diff --git a/app/Http/Controllers/Setup/LoginController.php b/app/Http/Controllers/Setup/LoginController.php index 474929f0..6935a56d 100644 --- a/app/Http/Controllers/Setup/LoginController.php +++ b/app/Http/Controllers/Setup/LoginController.php @@ -4,7 +4,7 @@ namespace App\Http\Controllers\Setup; use App\Http\Controllers\Controller; use App\Models\User; -use App\Support\InstallWizardAuth; +use App\Support\Setup\InstallWizardAuth; use Illuminate\Http\JsonResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; diff --git a/app/Http/Middleware/UseInstallWizardTokenAuth.php b/app/Http/Middleware/UseInstallWizardTokenAuth.php index 1b1891dc..8d07e83d 100644 --- a/app/Http/Middleware/UseInstallWizardTokenAuth.php +++ b/app/Http/Middleware/UseInstallWizardTokenAuth.php @@ -3,8 +3,8 @@ namespace App\Http\Middleware; use App\Models\Setting; -use App\Support\InstallWizardAuth; use App\Support\Setup\InstallUtils; +use App\Support\Setup\InstallWizardAuth; use Closure; use Illuminate\Http\Request; use Symfony\Component\HttpFoundation\Response; diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 911653ee..0af526e7 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -18,9 +18,9 @@ use App\Policies\ReportPolicy; use App\Policies\RolePolicy; use App\Policies\SettingsPolicy; use App\Policies\UserPolicy; -use App\Support\BouncerDefaultScope; -use App\Support\InstallWizardAuth; +use App\Support\Bouncer\BouncerDefaultScope; use App\Support\Setup\InstallUtils; +use App\Support\Setup\InstallWizardAuth; use Gate; use Illuminate\Http\Request; use Illuminate\Support\Facades\Broadcast; diff --git a/app/Support/BouncerDefaultScope.php b/app/Support/Bouncer/BouncerDefaultScope.php similarity index 96% rename from app/Support/BouncerDefaultScope.php rename to app/Support/Bouncer/BouncerDefaultScope.php index 828c12ce..438a7f0b 100644 --- a/app/Support/BouncerDefaultScope.php +++ b/app/Support/Bouncer/BouncerDefaultScope.php @@ -1,6 +1,6 @@