Skip to content

feat: update version nr with composer version nr#375

Open
ahuininga-orisha wants to merge 3 commits into
developfrom
feat/update-version-nr
Open

feat: update version nr with composer version nr#375
ahuininga-orisha wants to merge 3 commits into
developfrom
feat/update-version-nr

Conversation

@ahuininga-orisha

@ahuininga-orisha ahuininga-orisha commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaced the hardcoded Tweakwise version vx.x.x comment in the admin General settings group with a dynamic label field that reads the version from the installed Composer package at runtime.
  • Added Model/Config/Comment/Version.php, implementing Magento\Config\Model\Config\CommentInterface, which uses ComposerInformation::getInstalledMagentoPackages() to resolve the version of tweakwise/magento2-tweakwise — the same mechanism already used by Cron/Version.php for the User-Agent string.
  • The version no longer needs to be manually updated on each release.

How to test

Scenario 1 — Version displays correctly in the admin

  1. Log in to the Magento admin.
  2. Navigate to Stores > Configuration > Tweakwise > General.
  3. Verify a Module version field is visible showing the current installed version (e.g. Tweakwise version 9.x.x), matching the version in composer.lock for tweakwise/magento2-tweakwise.
  4. Switch to a website or store scope and confirm the version field is still visible.

Scenario 2 — Version matches composer

  1. Run composer show tweakwise/magento2-tweakwise from the Magento root.
  2. Note the versions value.
  3. Confirm it matches what is displayed in the admin field from Scenario 1.

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