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

@@ -345,12 +345,18 @@ shifts claimen zonder toegang tot de Organizer app.
---
### FORM-BUILDER-MORPH-SCOPE-BASE-CLASS — Extract base class across the four WS-5 morph-scope siblings
### ~~FORM-BUILDER-MORPH-SCOPE-BASE-CLASS — Extract base class across the four WS-5 morph-scope siblings~~
**Aanleiding:** Post-WS-5d, four near-duplicate scope classes implement the same UNION-over-two-owner-chains shape: `FormFieldBindingScope` (WS-5a), `FormFieldValidationRuleScope` (WS-5b), `FormFieldConfigScope` (WS-5b), `FormFieldOptionScope` (WS-5d). Each is ~40 lines of boilerplate plus the morph-alias names; the `apply()` body and the `resolveOrganisationId()` helper are byte-identical across all four. Base-class extraction was deferred during each WS-5 commit on the principle of "abstraction from N copies is premature when N+1 lands soon"; with the fourth concrete implementation now in place, the "what actually varies" question can be answered empirically.
**Wat:** Extract `App\Models\Scopes\FormFieldChildTableScope` abstract base. Subclasses declare only the two morph alias strings (`form_field`, `form_field_library`) — actually identical across all four siblings, so even the subclasses become trivial. Keep the four concrete classes as named entry points (the `withoutGlobalScope(FormFieldOptionScope::class)` escape-hatch contract is API surface). Single low-risk refactor PR; full WS-5 test suite must stay green byte-for-byte.
**Prioriteit:** Middel — quality-of-life refactor. No functional change, no schema change, no contract change. Land before any further child-table morph-pattern is introduced.
**Related:** Addendum §Q3 WS-5d Uitvoering paragraph "Vier scope-siblings → base-class extractie nu warranted".
**Status: closed 2026-04-25**`FormFieldChildTableMorphScope`
abstract base extracted; the four concrete scopes are now marker
subclasses preserving identity. Phase A diff verification confirmed
the four concrete `apply()` + `resolveOrganisationId()` bodies were
byte-equal (zero divergence across three pairwise comparisons). Net
diff: +165 / 377 lines. Tests 1208 → 1208 (3260 assertions, identical).
Larastan baseline clean; Rector dry-run 357 → 355.
See `app/Models/Scopes/FormFieldChildTableMorphScope.php` and
ARCH-CONSOLIDATION-ADDENDUM-2026-04-24.md §"Uitvoering — base scope-
class extractie (2026-04-25)".
---