Skip to content
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

Unstable badge displays old 0.2.0-beta2 release instead of 0.3.x-dev branch #342

Open
rob006 opened this issue Jun 24, 2020 · 7 comments
Open
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/

Comments

@rob006
Copy link

rob006 commented Jun 24, 2020

Package: https://packagist.org/packages/rob006/flarum-lang-polish

Latest Stable Version Latest Unstable Version

I would expect that unstable badge will show 0.3.x-dev branch and I'm pretty sure it worked in that way some time ago.

@rob006
Copy link
Author

rob006 commented Jun 24, 2020

This may be related to https://blog.packagist.com/composer-and-default-git-branches/

https://packagist.org/packages/rob006/flarum-lang-polish.json - while branch alias for dev-master is set as 0.3.x-dev, version is not normalized:

"version":"dev-master",
"version_normalized":"dev-master"

0.3.x-dev is also not listed in list of versions, only dev-master is available.

@JellyBellyDev
Copy link
Member

This may be related to https://blog.packagist.com/composer-and-default-git-branches/

https://packagist.org/packages/rob006/flarum-lang-polish.json - while branch alias for dev-master is set as 0.3.x-dev, version is not normalized:

"version":"dev-master",
"version_normalized":"dev-master"

0.3.x-dev is also not listed in list of versions, only dev-master is available.

@rob006 exactly! :(

@rob006
Copy link
Author

rob006 commented Jun 24, 2020

It works fine for Symfony: , while it is pretty similar situation. So it looks like it does not entirely depends on version_normalized. Could this different behavior between my package and Symony be related to v prefix in tags names?

@rob006
Copy link
Author

rob006 commented Jun 24, 2020

dev-master has now "default-branch":true in package JSON - I guess it should be used to internally normalize this branch to 9999999-dev (this is how Packagist handles it - default branch is always treated as the newest) and keep old behavior for dev-master branch.

@JellyBellyDev
Copy link
Member

@rob006 maybe it's related to this: badges/poser#26 (comment)?

@rob006
Copy link
Author

rob006 commented Jun 30, 2020

Yeah, it refers to changes described in the same blog post. Previously dev-master was normalized to 9999999-dev (which make it always the latest unstable branch), now it is not normalized at all and dev-master is returned as version_normalized.

@rob006
Copy link
Author

rob006 commented Jul 2, 2020

Packagist fixed versions ordering on their website, but API response has not been changed: composer/packagist@d313cb8. I guess that Badge-Poser should use similar solution to handle edge cases like https://packagist.org/packages/friendsofphp/php-cs-fixer correctly.

@garak garak added the Hacktoberfest https://hacktoberfest.digitalocean.com/ label Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest https://hacktoberfest.digitalocean.com/
Projects
None yet
Development

No branches or pull requests

3 participants