Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW getComposer() for more efficient Packagist API usage
From https://packagist.org/apidoc: > 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. I think it's important to include this method and nudge people towards using it, as a courtesy towards Packagist who are providing this API for free :) This particular API endpoint is a bit confusing, it is clearly designed to find a single package, yet it can return other unrelated in the "packages" response key. My theory is that it's used for internal performance reasons by composer ("sharding"). I've opted to leave this unaltered in the PHP API, rather than pick out the specific package. This should make it easier to read Packagist's API docs and understand the PHP API of this project. The new endpoint also overlaps with a different "packages" response signature in the popular.json endpoint, so I've opted to detect the types based on available keys in the factory. Note that there's hundreds of pre-existing phpcs failures which I didn't fix, it's a bit hard to tell if I made it worse (hopefully not!)
- Loading branch information
1 parent
2086ee8
commit 37a9b1e
Showing
6 changed files
with
117 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters