You can fetch/read the current module composer version number from the composer.json file programmatically in Magento 2.
Before fetching the current version, Your module must contain the composer.json file because we are reading the version number from the composer file only.
You can just create a simple Model class and create a function to return the module version. Continue reading “How to get the module version number from composer programmatically by Magento 2?”