Skip to content

feat: centralize driver registries with known-drivers.php pattern#91

Merged
markshust merged 6 commits into
developfrom
feature/known-drivers-registry
May 27, 2026
Merged

feat: centralize driver registries with known-drivers.php pattern#91
markshust merged 6 commits into
developfrom
feature/known-drivers-registry

Conversation

@markshust
Copy link
Copy Markdown
Collaborator

@markshust markshust commented May 27, 2026

Implements #89. Establishes known-drivers.php as the single curated source of truth for each interface package's drivers, eliminating hardcoded driver lists scattered across NoDriverException classes. CI tests mechanically enforce sync between this file and skeleton's suggest block.

What's in this PR

All 24 plan tasks implemented across 135 files (+2,535 / -396).

  • KnownDriversValidator in marko/testing — shared helper with assertSkeletonSuggestContainsAll and assertDocsUrlsResolveToValidPattern. Skips gracefully when skeleton isn't on disk or hasn't been populated yet; fails loudly on drift.
  • known-drivers.php in all 18 interface packagesauthentication, cache, database, encryption, errors, filesystem, http, inertia, log, mail, media, notification, page-cache, pubsub, queue, session, translation, view. Flat package => description arrays with recommended-first ordering.
  • All 18 NoDriverException classes refactored — no more hardcoded DRIVER_PACKAGES consts; suggestion text now includes description, composer require command, and derived marko.build/docs/packages/{basename}/ URL per driver.
  • New NoDriverException for marko/inertia — previously missing.
  • Renamed marko/page-cache's outlier noBinding()noDriverInstalled() for cross-package consistency.
  • Per-package KnownDriversValidationTest — enforces skeleton-suggest parity via CI on every interface.
  • marko/errors-advanced improvementsPrettyHtmlFormatter now renders context and suggestion fields (previously silently dropped) and auto-linkifies http(s):// URLs with target="_blank" rel="noopener noreferrer".
  • marko/view test cleanupIntegrationTest moved to marko/view-latte; view package now has zero dependency on its own drivers in tests.
  • Skeleton consolidationcomposer.json suggest block contains all 29 drivers (recommended-first per interface) plus optional add-ons (marko/database-readwrite, marko/page-cache-entity). Cross-cutting KnownDriversSuggestParityTest asserts every known-drivers.php entry is present.

Test results

5,611 tests passing (61 new). The 5 remaining failures (MySqlConnectionFac x2, PackagingTest x2, SplitWorkflowTest x1) are pre-existing infrastructure-dependent failures unrelated to this work.

Architectural alignment with merged PRs

Closes #89

Curated known-drivers.php per interface package as the single source of
truth for each driver list. CI tests enforce sync between the file, each
driver's composer.json conflict block, and skeleton's suggest block.
Eliminates the three-locations-drift problem when adopting new drivers.

25 tasks, ~5 parallel batches. WIP — depends on PR #88 (view-twig)
merging first so task 017 can be expanded to cover both view drivers.

Relates to #89

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
markshust and others added 4 commits May 27, 2026 09:47


PR #92 settled the architectural question: Marko relies on DI-level
BindingConflictException for double-binding detection, not Composer
`conflict` declarations. This plan no longer adds conflict blocks or
validates them — every rollout task is correspondingly simpler.

Changes:
- Deleted task 004 (pilot conflict blocks) — no longer needed
- Updated _plan.md task table, objective, success criteria, risks
- Removed assertConflictBlocksMatch from KnownDriversValidator (task 001);
  helper now exposes assertSkeletonSuggestContainsAll + assertDocsUrlsResolveToValidPattern
- Stripped conflict sub-step / requirement / acceptance criterion from
  rollout tasks 008-016 (multi-driver) and 011 (inertia)
- Rewrote task 017 (view): both view-latte and view-twig now in monorepo
  post-PR #92, no conflicts, both belong in known-drivers.php
- Cleaned up "vacuous conflict assertion" phrasing from single-driver
  tasks 018-024
- Simplified task 024 (page-cache): removed page-cache-entity conflict
  verification (moot when no drivers have conflicts)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…mark ready

Closes the gap left by deleting the conflict-blocks pilot task in the
previous commit. Tasks 005-025 each decrement by one (005 -> 004,
006 -> 005, ..., 025 -> 024). All cross-references updated:
- File names
- Task headers
- Depends-on fields
- _plan.md task table
- Prose references

Also updates two stale references to view-twig in Discovery Notes that
predated PR #88 / #92 (both drivers are now in monorepo, view rollout
is no longer a single-driver case).

Status: planning -> ready (plan-orchestrate expects this).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ource of truth for driver discovery

- Add KnownDriversValidator to marko/testing with assertSkeletonSuggestContainsAll and assertDocsUrlsResolveToValidPattern
- Create known-drivers.php in all 18 interface packages (authentication, cache, database, encryption, errors, filesystem, http, inertia, log, mail, media, notification, page-cache, pubsub, queue, session, translation, view)
- Refactor all 18 NoDriverException classes to read from known-drivers.php with descriptions and derived docs URLs
- Create inertia NoDriverException (previously missing)
- Rename page-cache NoDriverException factory from noBinding to noDriverInstalled for consistency
- Add KnownDriversValidationTest to each interface package for CI skeleton-suggest parity enforcement
- Extend errors-advanced PrettyHtmlFormatter to render context/suggestion fields and linkify URLs
- Move view IntegrationTest from marko/view to marko/view-latte (zero-dependency cleanup)
- Consolidate skeleton composer.json suggest block with all drivers and optional add-ons
- Add cross-cutting KnownDriversSuggestParityTest to skeleton

Closes #89

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@markshust markshust changed the title WIP: centralize driver registries with known-drivers.php pattern feat: centralize driver registries with known-drivers.php pattern May 27, 2026
@markshust markshust marked this pull request as ready for review May 27, 2026 15:17
@github-actions github-actions Bot added the enhancement New feature or request label May 27, 2026
…n-drivers.php files

Enforce a single canonical shape for driver descriptions:
- '{Tech} {category} driver ({parenthetical})'
- Category noun matches family name (mail/log not mailer/logger; errors/media not error handler/image processor; view not template engine driver)
- Recommended marker uses '(recommended; {justification})' — never '(recommended for X)' which read ambiguously
- At most one recommended driver per family (was previously multiple)
- All descriptive detail inside parens (no prose before/after the parenthetical)
- No em-dashes within driver descriptions

Document the convention at docs/concepts/known-drivers.md with format rules,
recommendation policy, punctuation, and the three category exceptions
(HTTP client, Inertia.js frontend, page cache).

Update skeleton composer.json suggest block to match new strings verbatim
so per-package KnownDriversValidationTest assertions pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@markshust markshust merged commit 2b35d10 into develop May 27, 2026
@markshust markshust deleted the feature/known-drivers-registry branch May 27, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Centralize driver registries with known-drivers.php pattern

1 participant