PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, January 22, 2022

[FIXED] Composer update without versioning

 January 22, 2022     composer-php, git, version-control, versioning     No comments   

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
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing