Repository navigation
Conversation
Append the installed Hyvä version as subtle secondary context in the mageforge:theme:build summary for Hyvä themes and child themes inheriting from Hyvä, and include hyva-themes/magento2-default-theme-csp in version detection. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
There are no active review issues blocking the Hyvä version summary enhancement.
No open issues 🎉
What changed in this PR
Enhances MageForge’s theme-build summary with the installed Hyvä version for direct and inherited Hyvä themes, while leaving non-Hyvä summaries unchanged.
Changes:
- Adds a grey Hyvä version suffix when a numeric version is available.
- Detects Hyvä through builders and theme ancestry, and checks the CSP default-theme package before the theme-module fallback.
- Adds unit coverage and updates the command reference.
| File | Description |
|---|---|
tests/Unit/Service/Hyva/HyvaVersionDetectorTest.php |
Tests CSP version detection and precedence over the theme module. |
tests/Unit/Console/Command/Theme/BuildCommandTest.php |
Tests direct and inherited Hyvä summaries, non-Hyvä output and unknown versions. |
src/Service/Hyva/HyvaVersionDetector.php |
Adds the CSP default-theme package to version lookup. |
src/Console/Command/Theme/BuildCommand.php |
Detects Hyvä ancestry and renders version-aware build summaries. |
docs/commands_reference.md |
Documents the Hyvä version in build summaries. |
Review effort: Balanced
Use is_string() narrowing on filter_input(INPUT_SERVER) in AbstractCommand::getServerVar() so Mago 1.61 does not treat the return type as plain string, and remove the unused int return value on BuildCommand::displayAvailableThemes(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
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.
Summary
mageforge:theme:build(frontend:build) summary when building a Hyvä theme (e.g.✅ Vendor/theme: Built successfully using HyvaThemes builder (Hyvä 1.5.5)).HyvaThemesbuilder /Hyva/*) and via their inheritance chain (e.g. child themes extending a custom Hyvä base that build via theTailwindCSSbuilder), while leaving non-Hyvä themes unchanged and omitting the suffix if no numeric Composer version can be resolved.hyva-themes/magento2-default-theme-cspinHyvaVersionDetectorbefore falling back tohyva-themes/magento2-theme-module.Verification
ddev phpunit --coverage(864 tests, 81.09% line coverage)ddev infection(85% Covered Code MSI)ddev phpcs,ddev phpstan,ddev mago lint,ddev mago fmt --check,ddev mago analyzetrunk checkddev magento frontend:build Magento/luma Hyva/default