From b2b7a07e0c627addf509d7abc77d36d2cb00ef54 Mon Sep 17 00:00:00 2001 From: Darko Gjorgjijoski Date: Thu, 9 Apr 2026 00:27:44 +0200 Subject: [PATCH] refactor(modules): migrate asset registry from app/Services to invoiceshelf/modules package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The vestigial App\Services\Module\Module static class — with its unused \$scripts / \$styles / \$settings registries — never had any of its helpers wired up. The new InvoiceShelf\Modules\Registry shipped from the invoiceshelf/modules package supersedes it cleanly: same static-array surface (\$menu, \$settings, \$scripts, \$styles), but lives outside the host app so third-party modules can depend on it without importing v3-app internals. Three consumers in the host app are migrated to the new namespace: - ScriptController and StyleController (the HTTP endpoints that serve module-registered JS/CSS assets at /modules/scripts/{name} and /modules/styles/{name}) now look up paths via Registry::scriptFor() and Registry::styleFor() instead of Arr::get(ModuleFacade::all*(), \$name). Also tightens type hints — Request import + Response return type. - resources/views/app.blade.php iterates Registry::allStyles() / Registry::allScripts() to inject module-supplied / @else