Best practice for Composer branch aliases and tags

948 views Asked by At

I have a package on Packagist. One I tagged the 0.2.0 version, I made a branch alias for dev-master set to 0.3.x-dev. So this means that all the developmet I'm doing is towards the next 0.3.x release. It also means that people can require a 0.3.*@dev version of my package.

Now, lets say that I suddenly realize that what I'm doing is more towards a 1.0 version, so I change the branch alias of dev-master to 1.0.x-dev. Since I never made a 0.3 tag, this results in broken dependencies for everyone using my package with the 0.3.*@dev requirement.

So... Should I have created a 0.3 tag anyway before I decided to change the branch alias? Or is that the risk that people take by requiring a dev branch of my package?

1

There are 1 answers

0
VonC On

Should I have created a 0.3 tag anyway before I decided to change the branch alias?

That is one possibility, but the users of that branch might not realize immediately that this branch has gone "stale" (doesn't evolve anymore)

Switching from 0.3 to 1.0 is a significant decision which should be communicated in some way.
Broken dependencies isn't the nicest way to advertise this release shift, but it does the job.

In the end, both choices don't really solve the issue, which is more a communication issue.