refactor(timetable): PURPOSE_SUBJECT_FQCN — Artist::class instead of string-literal

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-08 18:08:52 +02:00
parent 3e3636dc53
commit dd0d98f9ed

View File

@@ -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<string, class-string|string>
* @var array<string, class-string>
*/
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