Repository navigation
Hyva cms support - #11
Merged
Merged
Conversation
added 20 commits
August 16, 2026 12:55
The export usage block listed an --importAll flag that command does not have, neither block listed --hyva-cms, and the import block had the wrong syntax for --store. The folder structure predated the store code suffix.
A disabled CMS block or menu renders as nothing exactly like a missing one, so the existence check has to filter on is_active for every reference kind rather than for instance components alone. CmsBlockRenderer::renderBlock() returns early when is_active is false, and the menu widget only renders inside if ($menu && $menu->isActive()).
…o write isAvailable() guarded only PageRepositoryInterface while both classes also resolve JitCssRepository, and the writer resolves Provider as well. Those live in Hyva_CmsLiveviewEditor rather than Hyva_CmsMagento, so one check covered them only while the two ship inside the same package. writeFlags() also saved the entity even when the payload carried neither flag, which bumped update_time for nothing.
Every Hyva class was resolved through the object manager at each call site. They are now resolved once in the constructor, guarded on all of them being present, and used as ordinary properties afterwards. isAvailable() reports on the resolved property rather than probing a single unrelated interface. The docblocks had grown into prose. Trimmed to what the code cannot state itself: why the object manager is there, the two load bearing write orders, and the array shapes.
Constructor parameters carry the full namespace so a dependency is readable in a diff without scrolling to the imports. The two import/export services already followed this, the new Hyva classes did not. Drops the use statements that became unreferenced.
A CMS block identifier may contain ".html", and the block export writes the identifier into the filename verbatim, unlike the page export which converts it to "_html" first. Replacing every occurrence pointed at a file that does not exist, so the Hyva content for such a block was skipped silently while its native content imported fine. The pre-existing .json derivation carries the same flaw and is left alone.
Composer refuses to install packages carrying security advisories, and the pinned 2.4.5-p5 requires web-token/jwt-framework ^v2.2.7, every version of which is flagged. The job died in composer install before any test ran. 2.4.7 moved to a jwt-framework major that is not affected, and it needs PHP 8.2 or 8.3, so the action variant moves with it.
…PHP 8.4 Three files. ReferenceCollectorTest covers the walker, which is pure logic and needs nothing installed. HyvaCmsAbsentTest proves the degraded path that the public CI install actually exercises: the flag stays inert, the reader and writer return null rather than fatal, and the export with the flag on is byte identical to the export with it off. HyvaCmsPresentTest covers the real path and skips where Hyva is absent, since Hyva Commerce is licensed and CI cannot pull it. It pins the two write orderings, both of which are silent when reversed. 2.4.8-p5 is the current release and allows PHP 8.2 to 8.4, so the action variant moves to 8.4 to match what this module is deployed onto.
Magento 2.4.8 ships an elasticsearch-php that refuses any server not identifying as Elasticsearch 7.14 or newer, so setup:install died on the pinned 7.8 image with "the server is not Elasticsearch".
markTestSkipped() throws inside setUp before the typed properties are assigned, and PHPUnit then reads them, which aborted the run with "must not be accessed before initialization" before the summary printed.
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.
No description provided.