We built a web application build on top of the Symfony2 framework.
Now we need to display the current version of our software in the front end for the user to see. The version number is currently a tag in the git repository.
Now what is considered best practice to achieve this? The Composer documentation discourages the use of the version field used in the composer.json
Symfony itself seems to set the version string in the app/bootstrap.php.cache
file:
const VERSION ='2.7.6';
Is there any best practice regarding this issue? Is there a way to directly access the git tag name? Or should I go with the constant or composer.json
way?
You could try versioning-bundle. From their doc:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With