KnpLabs / packagist-api

PHP API for Packagist
MIT License
182 stars 46 forks source link

Get require info by package.json #71

Closed JellyBellyDev closed 3 years ago

JellyBellyDev commented 3 years ago

Hi, would it be possible to add to the library the possibility to retrieve information such as

"php": "^8.0",
"ext-gd": "*",

present in the require section of the composer.json file?

maybe even the full list of requires, like packagist?

Schermata 2021-08-23 alle 17 04 05

WDYT? Thanks

JellyBellyDev commented 3 years ago

Maybe we can use the new api composer v2 metadata?

robbieaverill commented 3 years ago

Hi @JellyBellyDev, this sounds like a good addition. Are you interested in making a pull request to add it?

JellyBellyDev commented 3 years ago

Hi @JellyBellyDev, this sounds like a good addition. Are you interested in making a pull request to add it?

Ok! I try!

JellyBellyDev commented 3 years ago

I studied the library and I think that this library should not expose one method to retrieve the require deps because these info are different for distinct version of the library. My opinion is that the user get the specific Version and retrieve the require info! WDYT?

robbieaverill commented 3 years ago

Yes that makes sense to me

JellyBellyDev commented 3 years ago

Great, then I close!