docs: close base scope-class extraction follow-up (post-WS-5)

Reflects the FormFieldChildTableMorphScope extraction landed in the
previous commit:

  - ARCH-FORM-BUILDER.md v1.9 — five locations updated:
      §6.7 (Relational binding table) — added forward reference
        sentence after the FormFieldBindingScope escape-hatch line
        (WS-5a was the first scope; previously had no deferral note
        because nothing existed yet to defer)
      §17.4.2 (Relational table form_field_validation_rules) —
        "deferred to WS-5d per addendum Q3" replaced with marker-
        subclass forward reference
      §17.5.3 (Service, scope, cascade — config) — same replacement
      §17.6.1 (Field options rationale) — "unblocks the deliberate
        follow-up" replaced with completion-confirmation
      §17.6.3 (Service / scope / cascade — option) — "deferred to a
        follow-up work package" replaced with marker-subclass forward
        reference + Phase A diff verification result
    Version metadata + changelog updated; v1.8 prose preserved in the
    Previous-versions block.

  - ARCH-CONSOLIDATION-ADDENDUM-2026-04-24.md — new
    "Uitvoering — base scope-class extractie (2026-04-25)" section
    inserted after the WS-5d Uitvoering, documenting the Phase A
    diff-verification, marker-subclass approach, private→protected
    YAGNI policy, the inline-FQN → use-statements stylistic refinement,
    static-analysis impact (Larastan baseline clean, Rector
    357 → 355), and net-diff figures.

  - BACKLOG.md — FORM-BUILDER-MORPH-SCOPE-BASE-CLASS item closed
    via strikethrough header + "Status: closed 2026-04-25" annotation
    (matches the TECH-TS-PORTAL-TSC closure convention from earlier
    this week).

  - SCHEMA.md — three stale "deferred" claims updated to reflect the
    completed extraction:
      header v2.6 changelog mention rewritten to point at the now-
        landed FormFieldChildTableMorphScope
      form_field_validation_rules table-section global-scope note
        replaced with marker-subclass forward reference
      form_field_options table-section global-scope note same
        replacement
    Schema version NOT bumped — no actual schema change.
    The two other scope mentions (form_field_bindings,
    form_field_configs) made no deferral claims and remain accurate.

Note: the work package's prose listed "§6.7 / §17.4.3 / §17.5.3 /
§17.6.3" as deferral-note locations. The actual locations were
§17.4.2 (not §17.4.3), §17.5.3, §17.6.1 (not just §17.6.3), and
§17.6.3 — §6.7 had no deferral note (WS-5a was the first scope,
nothing to defer yet). All five spots updated in line with the work
package's intent.

WS-5 family fully complete: no open follow-up items remain under the
"delete > adapt" discipline of the WS-5 refactor.

Tests: 1208 passed (3260 assertions). No code changes in this commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-25 04:52:01 +02:00
parent 9fa8231cf7
commit f7ddc1b3ce
4 changed files with 130 additions and 37 deletions

View File

@@ -230,6 +230,68 @@ WS-5d splitst zowel `form_fields.options` als `form_field_library.options` naar
**Afronding WS-5d.** 6 commits (commit 0 cleanup + 5 WS-5d core), baseline tests 1158 → 1208 volledig groen na commit 5. Breaking change acceptance: geen bridging compatibility layer — vier portal componenten (`FieldRadio`, `FieldSelect`, `FieldMultiselect`, `FieldCheckboxList`) gemigreerd naar `OptionSpec[]` rich-shape met locale-aware label-resolutie via `providePublicFormLocale` injectie en `resolveOptionLabel(option, locale)` helper in `@form-schema/types/formBuilder`. apps/app blijft onaangeraakt — `RegistrationField*.vue` componenten consumeren een ander legacy domein dat geen WS-5d migratie nodig heeft. **WS-5 familie compleet.**
### Uitvoering — base scope-class extractie (2026-04-25)
Sluit de WS-5-familie follow-up `FORM-BUILDER-MORPH-SCOPE-BASE-CLASS`
af. Vier concrete polymorfe morph-scope siblings landed across WS-5a/
b/d (`FormFieldBindingScope`, `FormFieldValidationRuleScope`,
`FormFieldConfigScope`, `FormFieldOptionScope`); de discipline-keuze
"abstract pas na vier concrete kopieën" werd door §17.4.2 / §17.5.3 /
§17.6.1 / §17.6.3 expliciet uitgesteld.
**Phase A diff-verificatie clean.** De vier concrete scope-files
waren byte-equal in `apply()` en `resolveOrganisationId()` (63 regels
per body, drie pairwise diffs leeg) — geen divergentie, geen
verborgen behavior-variatie tussen siblings. Het empirische
antwoord op "wat varieert daadwerkelijk?": niets. De abstractie is
een pure logica-deduplicatie.
**Aanpak: identity-preserving abstract base + marker subclasses.**
- `FormFieldChildTableMorphScope` (nieuw, abstract) bevat de volledige
UNION-over-two-owner-chains logica + de twee morph-alias-constanten
(`OWNER_TYPE_FIELD = 'form_field'`,
`OWNER_TYPE_LIBRARY = 'form_field_library'`) als private constants.
- De vier bestaande sibling-classes worden marker subclasses:
`final class X extends FormFieldChildTableMorphScope {}`. Lege body,
enkel-regel declaratie.
- Klasse-identiteit blijft behouden: alle bestaande
`Model::withoutGlobalScope(FormFieldXScope::class)` aanroepen in
cascade observers, backfill migraties en platform super_admin
paths werken zonder wijziging. Vier test-call-sites in de
`FormFieldXScopeTest` klassen werken eveneens zonder wijziging.
**Sichtbaarheid: `private` blijft.** De abstract class' helpers
blijven private. Als een toekomstige sibling alternatieve morph-
aliassen of owner-chains nodig heeft, promote dan
`private → protected` op dat moment. YAGNI-discipline: geen
flexibility-by-default.
**Geen tests gewijzigd.** De vier bestaande scope-tests
(`FormFieldBindingScopeTest`, `FormFieldValidationRuleScopeTest`,
`FormFieldConfigScopeTest`, `FormFieldOptionScopeTest`) verifiëren
publiek gedrag dat byte-equal blijft. Test + assertion tellingen
identiek pre- en post-refactor: 1208 / 3260.
**Net diff:** 5 files changed, +165 / -377. ≈219 regels duplication-
verlies over de vier sibling-files, ~125 regels toegevoegd in de
nieuwe base class, ~80 regels in de vier marker-subclass declaraties
combined.
**Static-analysis gates.** Larastan baseline blijft clean (geen
nieuwe errors buiten baseline; abstract base + marker subclasses
zijn type-compleet). Rector dry-run: 357 → 355 suggesties (kleine
reductie door dedupliceerde apply-bodies).
**Stylistisch: `use` statements i.p.v. inline FQNs.** De vier
originals gebruikten `\App\Models\Organisation` en `\App\Models\Event`
inline in `resolveOrganisationId()`. Bij de extractie zijn die
gemigreerd naar `use App\Models\Organisation;` / `use App\Models\Event;`
boven aan het bestand. Geen functionele wijziging, alleen leesbaarheid.
**WS-5-familie volledig afgerond.** Geen open follow-up items meer
onder de "delete > adapt" discipline van WS-5.
---
## Q4 — Sanctum `personal_access_tokens`