From 47907f9bf3add8b30cbd07815ebd556c786245ea Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Sat, 11 Apr 2026 18:00:00 +0200 Subject: [PATCH] refactor(support): flatten Integrations umbrella and rename Formatters to Formatting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two plural outliers were the only directories in Services/ and Support/ that didn't follow the singular naming convention we normalized in commit 947d00a9 (Documents -> Document). **Integrations/ExchangeRate/ -> ExchangeRate/.** The Integrations/ umbrella was both plural AND introduced an extra layer of nesting no other Support subdir had (Pdf/, Hashids/, Module/, Update/ are all one level deep). Dropping the umbrella fixes both problems in one move and matches the existing shape. When AI providers eventually land, they follow the same pattern as Support/Pdf/: a sibling subdir at Support/Ai/, not buried under an umbrella. **Formatters/ -> Formatting/.** Formatter (singular noun) would have been awkward; Formatting (gerund describing the capability) reads naturally as a namespace segment. The subdir holds DateFormatter, TimeFormatter, TimeZones — classes whose common thread is 'things that do formatting', which the gerund captures better than either the singular or plural noun form. 10 files renamed, 4 consumers updated (DriverRegistryProvider, ExchangeRateProviderService, FormatsController, ExchangeRateDriverFactoryTest). 350 tests pass, Pint clean. --- .../Controllers/Company/General/FormatsController.php | 6 +++--- app/Providers/DriverRegistryProvider.php | 8 ++++---- app/Services/ExchangeRateProviderService.php | 4 ++-- .../ExchangeRate/CurrencyConverterDriver.php | 2 +- .../ExchangeRate/CurrencyFreakDriver.php | 2 +- .../ExchangeRate/CurrencyLayerDriver.php | 2 +- .../ExchangeRate/ExchangeRateDriver.php | 2 +- .../ExchangeRate/ExchangeRateDriverFactory.php | 2 +- .../ExchangeRate/ExchangeRateException.php | 2 +- .../ExchangeRate/OpenExchangeRateDriver.php | 2 +- app/Support/{Formatters => Formatting}/DateFormatter.php | 2 +- app/Support/{Formatters => Formatting}/TimeFormatter.php | 2 +- app/Support/{Formatters => Formatting}/TimeZones.php | 2 +- tests/Unit/ExchangeRateDriverFactoryTest.php | 6 +++--- 14 files changed, 22 insertions(+), 22 deletions(-) rename app/Support/{Integrations => }/ExchangeRate/CurrencyConverterDriver.php (97%) rename app/Support/{Integrations => }/ExchangeRate/CurrencyFreakDriver.php (97%) rename app/Support/{Integrations => }/ExchangeRate/CurrencyLayerDriver.php (97%) rename app/Support/{Integrations => }/ExchangeRate/ExchangeRateDriver.php (94%) rename app/Support/{Integrations => }/ExchangeRate/ExchangeRateDriverFactory.php (98%) rename app/Support/{Integrations => }/ExchangeRate/ExchangeRateException.php (82%) rename app/Support/{Integrations => }/ExchangeRate/OpenExchangeRateDriver.php (97%) rename app/Support/{Formatters => Formatting}/DateFormatter.php (97%) rename app/Support/{Formatters => Formatting}/TimeFormatter.php (95%) rename app/Support/{Formatters => Formatting}/TimeZones.php (99%) diff --git a/app/Http/Controllers/Company/General/FormatsController.php b/app/Http/Controllers/Company/General/FormatsController.php index 9708c26a..9c8e9951 100644 --- a/app/Http/Controllers/Company/General/FormatsController.php +++ b/app/Http/Controllers/Company/General/FormatsController.php @@ -3,9 +3,9 @@ namespace App\Http\Controllers\Company\General; use App\Http\Controllers\Controller; -use App\Support\Formatters\DateFormatter; -use App\Support\Formatters\TimeFormatter; -use App\Support\Formatters\TimeZones; +use App\Support\Formatting\DateFormatter; +use App\Support\Formatting\TimeFormatter; +use App\Support\Formatting\TimeZones; use Illuminate\Http\JsonResponse; class FormatsController extends Controller diff --git a/app/Providers/DriverRegistryProvider.php b/app/Providers/DriverRegistryProvider.php index 90b12aa4..521011f8 100644 --- a/app/Providers/DriverRegistryProvider.php +++ b/app/Providers/DriverRegistryProvider.php @@ -2,10 +2,10 @@ namespace App\Providers; -use App\Support\Integrations\ExchangeRate\CurrencyConverterDriver; -use App\Support\Integrations\ExchangeRate\CurrencyFreakDriver; -use App\Support\Integrations\ExchangeRate\CurrencyLayerDriver; -use App\Support\Integrations\ExchangeRate\OpenExchangeRateDriver; +use App\Support\ExchangeRate\CurrencyConverterDriver; +use App\Support\ExchangeRate\CurrencyFreakDriver; +use App\Support\ExchangeRate\CurrencyLayerDriver; +use App\Support\ExchangeRate\OpenExchangeRateDriver; use Illuminate\Support\ServiceProvider; use InvoiceShelf\Modules\Registry; diff --git a/app/Services/ExchangeRateProviderService.php b/app/Services/ExchangeRateProviderService.php index e9d06684..f8c847dc 100644 --- a/app/Services/ExchangeRateProviderService.php +++ b/app/Services/ExchangeRateProviderService.php @@ -6,8 +6,8 @@ use App\Http\Requests\ExchangeRateProviderRequest; use App\Models\CompanySetting; use App\Models\ExchangeRateLog; use App\Models\ExchangeRateProvider; -use App\Support\Integrations\ExchangeRate\ExchangeRateDriverFactory; -use App\Support\Integrations\ExchangeRate\ExchangeRateException; +use App\Support\ExchangeRate\ExchangeRateDriverFactory; +use App\Support\ExchangeRate\ExchangeRateException; class ExchangeRateProviderService { diff --git a/app/Support/Integrations/ExchangeRate/CurrencyConverterDriver.php b/app/Support/ExchangeRate/CurrencyConverterDriver.php similarity index 97% rename from app/Support/Integrations/ExchangeRate/CurrencyConverterDriver.php rename to app/Support/ExchangeRate/CurrencyConverterDriver.php index ac9a1ef8..0e0da118 100644 --- a/app/Support/Integrations/ExchangeRate/CurrencyConverterDriver.php +++ b/app/Support/ExchangeRate/CurrencyConverterDriver.php @@ -1,6 +1,6 @@