Skip to content

refactor(notifications): the example-set engine reaches the timeline writer through an interface - #7568

Merged
rubenvdlinde merged 3 commits into
mainfrom
cloud/k07-timeline-rows
Nov 9, 2026
Merged

rubenvdlinde merged 3 commits into
mainfrom
cloud/k07-timeline-rows

Conversation

@rubenvdlinde

Copy link
Copy Markdown
Contributor

Lane K07, round 10c, component independence.

What changed

  • New Notifications\Service\ExampleSet\ExampleSetTimelineRowsInterface (rows(): ExampleSetEngineRows), implemented by ExampleSetTimelineEntries (rows() returns $this). This is the same pattern as ExampleSetViewRowsInterface in [access] refactor(search): the example-set views writer, the index rebuild job and the vector rows stay inside Search #7447.
  • Service\ExampleSet\ExampleSetHistoryRowKinds now types ?ExampleSetTimelineRowsInterface and hands ->rows() to the engine, so lib/Service no longer names the Notifications class.
  • Binding ExampleSetTimelineRowsInterface => ExampleSetTimelineEntries added to NotificationsWiring::BINDINGS, so the autowired optional writer still resolves to the same shared class. Without the binding it would quietly fall back to null and refuse the part.
  • Tests: K07InterfaceBindingsTest (new) pins the binding, checks the class implements the interface, and checks the caller names only the interface. The NotificationsRegistrarTest pinned alias count goes from 26 to 27 for this one binding. In the golden and bundle tests, the writer doubles now answer rows() with themselves.

What ran (branch merged with current development)

  • tests/Unit/Architecture, tests/Unit/Contract, tests/Unit/Kernel, tests/Unit/Service/Rules, ControllerServicesWiringTest, ControllerSessionWiringTest, tests/Unit/Service/ExampleSet, tests/Unit/Service/Flow, tests/Unit/Notifications: OK (5532 tests).
  • php -l, phpcs (one pre-existing missing-@SPEC warning on NotificationsWiring), phpstan: no errors on the touched files.

Numbers (lane_measure K07)

Exposed LOC for K07 classes: 604 on development, 480 with this PR (ExampleSetTimelineEntries, 124 LOC, is now hidden). Interfacing is unchanged (gt4 128, gt6 0).

AI-assisted: written by Claude Code (Opus 5.5).


Generated by Claude Code

…writer through an interface

ExampleSetHistoryRowKinds typed the Notifications ExampleSetTimelineEntries
class. It now takes ExampleSetTimelineRowsInterface (rows() hands the writer
back as the engine's ExampleSetEngineRows, the pattern ExampleSetViewRowsInterface
uses), bound in NotificationsWiring so the autowired optional writer still
resolves to the same class. The registrar's pinned alias count goes from 25
to 26 for that one binding; K07InterfaceBindingsTest pins the binding and
that the caller names only the interface.

Assisted-by: ClaudeCode:claude-opus-5-5
…line-rows

# Conflicts:
#	lib/Notifications/NotificationsWiring.php
@rubenvdlinde
rubenvdlinde changed the base branch from development to main November 9, 2026 06:54
Resolve the golden-test conflict: main stubs rows() on ExampleSetViewRowsInterface
doubles, this branch on ExampleSetTimelineRowsInterface doubles; the writer double
now stubs it for either.

Assisted-by: ClaudeCode:claude-opus-5-5
@rubenvdlinde
rubenvdlinde merged commit 41d87c9 into main Nov 9, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants