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

Allow fetching packagist.org/packages.json without provider-includes #1367

Closed
effulgentsia opened this issue Mar 24, 2023 · 3 comments
Closed
Labels

Comments

@effulgentsia
Copy link

For BC with Composer 1, https://packagist.org/packages.json includes the provider-includes field in its response.

Since this field is not used by Composer 2, for clients that know they are using Composer 2, it would be nice to be able to request a representation of https://packagist.org/packages.json without that field. For example, perhaps a syntax like https://packagist.org/packages.json?provider-includes=false or https://packagist.org/packages.json?v2.

A use-case for this is for Drupal we're working on integrating package and metadata signatures based on The Update Framework, and until Packagist implements its own signing system (whether TUF or something else), we're looking into adding a signature for https://packagist.org/packages.json into Drupal's TUF repository. However, the provider-includes section of that file changes frequently, which would complicate that for us. If instead we could sign and use something like a https://packagist.org/packages.json?v2 URL that didn't include provider-includes, then that signature would be less volatile.

Alternatively, we can remove that field on our end after downloading it, but that seems more fragile, so thought I'd open this issue to see if Packagist maintainers think it's a good idea to add a v2-only representation on your end. Whether you're for or against that, thanks in advance for considering it!

@stof
Copy link
Contributor

stof commented Mar 27, 2023

Adding a query string to change the content would be hard because this is a static file served directly by nginx.

@Seldaek
Copy link
Member

Seldaek commented Jun 21, 2023

Yeah I'd rather not complicate matters there, we have had a single entry point as a static file for over 10years. Removing provider-includes before signing sounds reasonable though..

@effulgentsia
Copy link
Author

Thanks for the answer! Makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants