-
-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add branch-alias for master branch #204
Conversation
@Seldaek Thanks for bringing this up! Love to see more usage of our upcoming promise v3 and agree that having a safer way to test out this version sounds promising (sorry). That said, I wonder how this will affect the development branch in the longer run. It's my understanding this branch alias would exist until we tag v3 at which point it would be removed again? How does this affect your plans to rely on this development version? Would this considered to be breaking? Also, I'm sure v3 will still see a number of changes that may or may not break your usage, so I wonder if we should endorse relying on it at the moment or if targeting it by using its commit hash would be safer? I think we all agree that it's about time we get the promise v3 out! We've had some discussions this week about this already and we're trying to get this out as soon as possible. |
Don't worry I have no intent on shipping a dev version of this lib in Composer, I'm not insane :D There is literally no downside I can think of of adding a branch-alias though. It's not only useful pre-release, it's also useful later. Composer has one too for example https://github.com/composer/composer/blob/main/composer.json#L62 - it now allows people to require On the other hand if you don't have a branch-alias, you force people to require Probably I should make sure this is better explained in https://getcomposer.org/doc/articles/aliases.md#branch-alias |
I'm relieved! 😃 I agree that being able to install This way, the branch name would be in line with the other branches ( This also allows you to target release ranges like IMHO this way we would provide everything you've suggested without causing any maintenance work down the line (see also reactphp/reactphp#343 where we've decided to remove the branch aliases – though admittedly the ecosystem looked entirely different back then). What do you think about this? |
I just think offering only dev-master as option for requiring dev packages is preventing your users from using sane constraints and thus encouraging people to shoot themselves in the foot. But for sure using a branch-alias is merely a way to make it look as if you had a versioned branch even though it is named, so using versioned branches directly is totally fine too. It's just more work I find (you seem to think it's easier to rename the branch than the branch-alias, I guess it's down to workflow/habit mostly), and depending on the project renaming the default branch often is not so practical, so branch-alias is there if you need it. |
Agreed, definitely valuable to have both options depending on requirements! Good discussion, really helps moving this forward, thank you very much! |
This allows requiring the package as
^3@dev
which is safer thandev-master
in the long run.