Files
crewli/api/app/FormBuilder/Resolvers/ArtistResolverResult.php
bert.hausmans cc48011da6 feat(timetable): ArtistResolver::fromPortalToken — engagement-scoped subject resolution
Resolves the artist subject + event_id + engagement for the
artist_advance portal flow. Per RFC v0.2 D15 + ARCH-FORM-BUILDER
§17.3 footnote: master Artist is the subject (preserves
form_submissions.subject_type='artist'), engagement provides
event_id (per WS-4 denormalisation), and engagement itself rides
along so callers can resolve advance_section context without a
second query.

Token comparison uses SHA-256 hex digest matching Session 1's
storage shape (commit eb6d396). Two domain exceptions distinguish
404 (no matching token → InvalidPortalTokenException) from 410
(master artist soft-deleted post-engagement → ArtistDeletedException
with engagementId attached).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 22:13:34 +02:00

28 lines
772 B
PHP

<?php
declare(strict_types=1);
namespace App\FormBuilder\Resolvers;
use App\Models\Artist;
use App\Models\ArtistEngagement;
/**
* Value object returned by ArtistResolver::fromPortalToken.
*
* Per ARCH-FORM-BUILDER §17.3 footnote: artist_advance submissions use
* the master Artist as `subject` (preserves form_submissions.subject_type
* = 'artist'); `eventId` populates form_submissions.event_id per WS-4
* denormalisation; the engagement itself is returned so callers
* (controllers, listeners) can resolve advance_section context without
* a second query.
*/
final readonly class ArtistResolverResult
{
public function __construct(
public Artist $subject,
public string $eventId,
public ArtistEngagement $engagement,
) {}
}