From dd0d98f9ed4f9702e886312c73e386bb549e123a Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Fri, 8 May 2026 18:08:52 +0200 Subject: [PATCH] =?UTF-8?q?refactor(timetable):=20PURPOSE=5FSUBJECT=5FFQCN?= =?UTF-8?q?=20=E2=80=94=20Artist::class=20instead=20of=20string-literal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The string-literal workaround was added before the Artist model existed (ARCH-09 prerequisite). With the model now landed (RFC-TIMETABLE v0.2 Session 1), resolve to Artist::class directly so morph-map registration matches the rest of the registry. MorphMapAlignmentTest still green. Co-Authored-By: Claude Opus 4.7 (1M context) --- api/app/Providers/AppServiceProvider.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/api/app/Providers/AppServiceProvider.php b/api/app/Providers/AppServiceProvider.php index 0aaf16ad..98a1e653 100644 --- a/api/app/Providers/AppServiceProvider.php +++ b/api/app/Providers/AppServiceProvider.php @@ -16,6 +16,7 @@ use App\Listeners\FormBuilder\ApplyBindingsOnFormSectionSubmitted; use App\Listeners\FormBuilder\ApplyBindingsOnFormSubmit; use App\Listeners\FormBuilder\SyncTagPickerSelectionsOnSubmit; use App\Listeners\FormBuilder\TriggerPersonIdentityMatchOnFormSubmit; +use App\Models\Artist; use App\Models\Company; use App\Models\CrowdList; use App\Models\CrowdType; @@ -72,17 +73,16 @@ class AppServiceProvider extends ServiceProvider /** * FQCN lookup for every `subject_type` alias that PurposeRegistry may * return. Single source of truth for domain-subject → model mapping, - * consumed by the morph-map build in boot(). The `artist` class is - * declared as a string because the Artist model is not yet landed; - * it is safe to register the morph alias (lazily resolved). + * consumed by the morph-map build in boot(). `artist` resolves to + * `App\Models\Artist` (introduced 2026-05, RFC-TIMETABLE Session 1). * - * @var array + * @var array */ private const PURPOSE_SUBJECT_FQCN = [ 'person' => Person::class, 'user' => User::class, 'company' => Company::class, - 'artist' => 'App\\Models\\Artist', + 'artist' => Artist::class, ]; public function register(): void