Skip to content

Conversation

@mbabker
Copy link
Contributor

@mbabker mbabker commented Mar 5, 2025

Per https://packagist.org/apidoc the v1 metadata endpoint is deprecated and stopped receiving updates as of February 1 and will be removed entirely later this year. This PR therefore updates the client to use the v2 metadata endpoint instead.

This will require a new major version because the data structure between the two metadata endpoints is slightly different and consuming applications will need to update their code.

As suggested, this also bumps the required PHP version to PHP 8.2, uses Pint and Rector to do some automated refactoring, and updates the CI configuration to match what's happening in some of the other Spatie repositories.

I've also gone ahead and added support for other endpoints that weren't previously covered, which will allow consumers to:

  • Fetch the list of popular packages
  • Fetch a package's download stats

@freekmurze
Copy link
Member

Great! Could you make the tests pass as well? Feel free to drop everything below PHP 8.2 and make use of modern PHP features if needed 👍

@mbabker mbabker changed the title [B/C Break] Use the v2 metadata for package metadata [B/C Break] Use the v2 metadata for package metadata, misc. dependency updates, new API endpoints Mar 8, 2025
@mbabker
Copy link
Contributor Author

mbabker commented Mar 8, 2025

@freekmurze I've gone ahead and done a bunch of updates to get this package up-to-date and the CI's passing on my fork - https://github.com/mbabker/packagist-api/actions/runs/13741661886 - so we should be good here.

@freekmurze freekmurze merged commit bf1c132 into spatie:main Mar 21, 2025
7 checks passed
@freekmurze
Copy link
Member

Stellar work, thank you!

@mbabker mbabker deleted the v2-meta branch March 21, 2025 11:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants