Repository navigation
feat: theme-aware asset helper and config key constants - #5
Merged
Merged
Conversation
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>
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.
Types of changes
Checklist:
prototype/resolver. Retarget to1.0.xonce feat: theme resolver (theme-keyed maps) and updated spec-kit documents #4 merges.)Description
Phase 10 of
specs/001-theme-resolution/tasks.md(T042 to T046, T048) and T062, T063.AssetFactorybuilds the stockLaminas\View\Helper\Assetfromtheme.assets: thedefaulttheme 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 underview_helper_config.asset.resource_mapare kept as the base.InvalidThemeNameException.ConfigProvidergainsTHEME,ACTIVE,THEMESandASSETSconstants (D-005) and registers the factory underview_helpers.factories.ConfigPathreads 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,guardexit 0.composer test: 30 tests.composer test-integration: 7 tests, through a realHelperPluginManager.composer mutation-test: 41 mutants, all killed, MSI 100%.