Skip to content

feat: theme-aware asset helper and config key constants - #5

Merged
tyrsson merged 2 commits into
prototype/resolverfrom
feat/asset-helper
Oct 1, 2026
Merged

tyrsson merged 2 commits into
prototype/resolverfrom
feat/asset-helper

Conversation

@tyrsson

@tyrsson tyrsson commented Oct 1, 2026

Copy link
Copy Markdown
Member

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

Description

Phase 10 of specs/001-theme-resolution/tasks.md (T042 to T046, T048) and T062, T063.

  • AssetFactory builds the stock Laminas\View\Helper\Asset from theme.assets: the default theme first, then the active theme, so the fallback is per asset name. A relative value is served from /theme/<theme>/, an absolute URL (https://, http://, //) passes through, and entries already under view_helper_config.asset.resource_map are kept as the base.
  • A theme name must be a single path segment; otherwise InvalidThemeNameException.
  • ConfigProvider gains THEME, ACTIVE, THEMES and ASSETS constants (D-005) and registers the factory under view_helpers.factories.
  • ConfigPath reads a nested array out of merged config.

Not in this PR: T047 (quickstart text for theme authors) and the rest of Phases 11 to 13.

How has this been tested?

mago format --check, lint, analyze, guard exit 0. composer test: 30 tests. composer test-integration: 7 tests, through a real HelperPluginManager. composer mutation-test: 41 mutants, all killed, MSI 100%.

AssetFactory builds the stock Asset helper from theme.assets, default first then the active theme, with per-name fallback. Relative values are served from /theme/<theme>/, absolute URLs pass through, and theme names must be a single path segment. ConfigProvider gains THEME, ACTIVE, THEMES and ASSETS constants.

Signed-off-by: Joey Smith <jsmith@webinertia.net>
Signed-off-by: Joey Smith <jsmith@webinertia.net>
@tyrsson
tyrsson merged commit 058ebe9 into prototype/resolver Oct 1, 2026
@tyrsson
tyrsson deleted the feat/asset-helper branch October 1, 2026 07:37
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.

1 participant