Open danmcadams opened 5 years ago
Hi! Thanks for the report.
Confirmed. It looks like there is some lag. The new version is not reflected in the endpoint we're hitting:
https://packagist.org/packages/theroadbunch/command-menu.json
Based on the doc here https://packagist.org/apidoc#get-package-data it's cached for 12 hours, which explains the issue.
Maybe the version badge could be modified to use the "always up to date" endpoint those docs mention, instead:
Interesting stuff, thanks for the quick response. I thought it may be a caching issue so I went to my package on packagist and the correct version was shown. Oh well, at least now I know.
Thanks again
@chris48s Do you know any reason (other than historical) that we might be using the dynamic endpoint for the version?
No. Some of the packagist badges use /p
and some use /packages
but I don't think there is any solid reason for that (although note that the format of those 2 endpoints is slightly different so we'd need to modify the parsing code a little bit to change).
I think we can switch to "Composer metadata" (https://packagist.org/apidoc#get-package-data). It will be beneficial for Shields and for Packagist. About Composer metadata:
This is the preferred way to access the data as it is always up to date, and dumped to static files so it is very efficient on our end.
Sounds like a win-win
HI, i would like to work on this today :)
Are you experiencing an issue with...
:beetle: Description The version number on my packagist shield is not being updated, it is however the most recent version when you go to the page on packagist. I checked the other issues here and they don't seem to line up with my issue. My versions are tagged exactly the same, and I have no version listed in composer.
Current version is v0.1.0 and my shield shows v0.0.1
The repository in question is here: https://github.com/The-Road-Bunch/command-menu
:link: Link to the badge https://img.shields.io/packagist/v/theroadbunch/command-menu.svg
:bulb: Possible Solution