feat: extract admin-panel templates into engine-specific sibling packages#94
Merged
Merged
Conversation
…packages Extracts admin-panel's .latte templates into marko/admin-panel-latte and introduces marko/admin-panel-twig (hand-translated equivalents). Adds templates_for composer-extra metadata so the resolver finds template provider packages. CrossEngineTemplateParityTest in marko/view enforces adopting a new core engine means shipping templates for every UI module. 10 tasks, ~4 parallel batches. WIP — depends on PR #92 (drop view conflicts) merging first so the symmetric-monorepo pattern is settled before this plan runs. Relates to #93 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
plan-orchestrate expects 'ready' status to begin execution. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ific sibling packages
Introduces marko/admin-panel-latte and marko/admin-panel-twig as template-only
sibling packages, establishing the marko/{module}-{engine} pattern for UI packages
that want multi-engine support. ModuleManifest gains an $extra field so
ModuleTemplateResolver can resolve templates from packages declaring
extra.marko.templates_for, making the admin-panel::path namespace work regardless
of which engine sibling is installed. CrossEngineTemplateParityTest in marko/view
mechanically enforces that adding a new core engine requires shipping templates for
every existing UI module.
Closes #93
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…l-engine-siblings # Conflicts: # packages/framework/tests/RootComposerJsonTest.php
…rity failures
known-engines.php now ships a human-readable description for each
registered engine, matching the format of known-drivers.php. The
description is surfaced in CrossEngineTemplateParityTest failure
messages when a template provider is missing for some parent module:
Before:
"...missing a provider for engine 'twig'. Expected a package..."
After:
"...missing a provider for engine 'twig' (Twig — recommended for
broader PHP ecosystem familiarity (Symfony, Drupal, Craft CMS)).
Expected a package..."
Also positions known-engines.php for future use by an enhanced
TemplateNotFoundException (out of scope here) to hint at missing
engine-sibling packages with descriptive context.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements #93. Extracts
marko/admin-panel's 5.lattetemplates into engine-specific siblings (marko/admin-panel-latte,marko/admin-panel-twig), keeping admin-panel's controllers engine-agnostic. Establishes themarko/{module}-{engine}pattern as the canonical approach for multi-engine UI packages.What shipped
marko/admin-panel-latte— template-only package with the 5 Latte templates (moved from admin-panel, git history preserved viagit mv)marko/admin-panel-twig— template-only package with 5 hand-translated Twig equivalents producing equivalent HTMLModuleManifest::$extra— new field exposingcomposer.jsonextrametadata to the framework (cross-package change inmarko/core)ModuleTemplateResolverenhancement — resolvesadmin-panel::pathviaextra.marko.templates_fordeclarations, so siblings hook into the parent's namespace transparentlymarko/admin-panelslimmed —resources/views/removed entirely; composer.jsonsuggestblock points to both siblingspackages/view/known-engines.php— canonical registry of core engines (twig first, latte second)CrossEngineTemplateParityTest— mechanically enforces that every registered engine has a template provider for every UI module; adding a new core engine fails the build until parity is restored.claude/architecture.md— documents themarko/{module}-{engine}sibling patternNo Composer conflict between siblings
Both
admin-panel-latteandadmin-panel-twigcan be installed simultaneously — the resolver picks templates based onview.extensionconfig. Worst case is wasted disk space. Symmetric with PR #92's pattern for view drivers.Breaking change
Apps that installed
marko/admin-panelalone (assuming bundled templates) will hitTemplateNotFoundExceptionon admin routes. Migration:composer require marko/admin-panel-latte(or-twig) alongsidemarko/admin-panel. Pre-1.0, so this is a minor version bump.Test plan
composer testpasses (5513 passed; 6 pre-existing failures unrelated)marko/admin-panel-latteLayoutTemplateTest passes against moved templatesmarko/admin-panel-twigLayoutTemplateTest passes against new Twig templatesModuleTemplateResolverresolvesadmin-panel::dashboard/indexto admin-panel-latte path (integration test)CrossEngineTemplateParityTestpasses (both engine providers exist for admin-panel)RootComposerJsonTestupdated (72 packages including both new siblings)Closes #93