Skip to content

feat: automatic update version nr#143

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

feat: automatic update version nr#143
ahuininga-orisha wants to merge 6 commits into
developfrom
feat/update-version-nr

Conversation

@ahuininga-orisha
Copy link
Copy Markdown
Collaborator

Summary

  • Replaced the hard-coded version string in etc/adminhtml/system.xml with a dynamic label field that reads the installed package version at runtime.
  • Added Model/Config/Comment/Version.php, implementing Magento's CommentInterface, which uses ComposerInformation::getInstalledMagentoPackages() to look up the tweakwise/magento2-tweakwise-export composer package version and display it at the top of the Export settings group.
  • The version label is now always in sync with the installed composer version — no more manual version bumps in XML.

How to test

Scenario 1 — Version is displayed in admin

  1. Run setup:di:compile and cache:clean.
  2. Log in to the Magento admin and navigate to Stores → Configuration → Catalog → Tweakwise → Export.
  3. Verify that a "Module version" field is shown at the top of the group, displaying the correct version (e.g. Tweakwise Export version v7.8.3).

Scenario 2 — Version matches composer

  1. Run composer show tweakwise/magento2-tweakwise-export and note the installed version.
  2. Compare it to what is shown in the admin field from Scenario 1.
  3. Verify they match.

Comment thread Model/Config/Comment/Version.php Outdated
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.

2 participants