Issue
I'm developing a composer package used in another application. The package resides in a separate repository. Every now and then when I fix something in the package during the development, I have to increment its version by assigning a git tag so that the application where the package is used can download the latest version of it. I end up having lots of tags.
Is there a more appropriate way allowing to update (the composer update cmd) the package under development in the app where it's used without using thousands of tags?
Say I change the package, commit and push the changes to the repo. When I do composer update in the app's scope, it updates the package, although it's version is not incremented with the last change, there are only new commits in the package's repo.
Solution
What is bad with having a lot of tags?
You can depend on branches. Composer would clone the repository and checkout the latest commit of that branch every time you run update. I highly recommend to depend on a branch using a version alias: "your/lib": "dev-feature as 2.2.0"
- this will fulfill dependencies of other libs that require this one in a certain version, and it makes it clearer which version this branch is based on.
Answered By - Sven
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.