Closed llaville closed 8 months ago
Thank you @llaville. This PR totaly makes sense to me as I all the time forget to update version and I also don't have permission to amend code without pull request.
As an alternative solution I could suggest to rely on composer-runtime-api
v2 which will automatically fetch version from composer.lock on the consumers side. See https://github.com/povils/phpmnd/pull/176
I'm okay to merge your PR and release 3.4.1 version and after that we could merge https://github.com/povils/phpmnd/pull/176 and release 3.5.0
WDYT @llaville ?
cc/ @exussum12, @kubawerlos
@sidz I'm agree with you about using composer-runtime-api
v2. I did it myself on one of my projects like (https://github.com/llaville/php-compatinfo/blob/master/src/Presentation/Console/Application.php#L61-L64)
But in this case you must set the version on Application class constructor and do not use anymore the Application::VERSION
constant.
Warning : The TestCase i've introduced with this PR won't work with composer-runtime-api
@llaville yeah, that exactly what I did in https://github.com/povils/phpmnd/pull/176
Any news about merging status of thid PR or not in favor of another alternative ?
Merged.
Thanks @llaville
Hello,
It's almost always the case when we use an hard coded version (with
Application::VERSION
) to forget to bump it before to push a new release !To avoid in future to avoid such case, I propose this PR that add a TestCase that is run by CI only when you'll push a tag to repository.
When you push code to a branch, PHPUnit will run this command
vendor/bin/phpunit --exclude-group tags
But when you'll push a tag to repo, PHPUnit will run all tests including this new one (i.e) :