composer / packagist

Package Repository Website - try https://packagist.com if you need your own -
https://packagist.org/
MIT License
1.75k stars 477 forks source link

Allow proposed PIE extensions to be submitted to Packagist #1440

Closed asgrim closed 6 months ago

asgrim commented 6 months ago

Something we have discussed with previously is to allow a PIE-formatted PHP extension to be submitted to Packagist.

https://github.com/ThePHPF/pie-design?tab=readme-ov-file#extension-maintainer-register-a-pie-package

The TLDR is:

Example repository containing a composer.json in this style at the moment - I will be using this to initially work on PIE:

Presently, this extension cannot be submitted, since the naming is not correct:

Screenshot from 2024-03-18 10-51-56

asgrim commented 6 months ago

Parts of this are already WIP - see composer/composer#11795

stof commented 6 months ago

The question then is also how those PIE extension packages are treated in Packagist, as they won't make sense in the composer solver (they need to be installed with the PIE tool):

If vendor namespaces are not used, packagist will need to be adapted to support such extension package names (which might be ambiguous between the page of the package ext-foo and the listing of all packages in the ext-foo namespace depending on the URL structure)

Seldaek commented 6 months ago

Everything should be ready to submit to packagist now, I'll add an extensions list page later.

stof commented 6 months ago

@Seldaek when I mentioned packagist.org/extensions/, I was mostly referring to the JSON files, so having a separate packagist.org/extensions/packages.json file (with the associated files for each package) for the extension repository. This way, composer would not see those packages when loading packagist.org/packages.json and PIE could load a repository containing only extensions.

Seldaek commented 6 months ago

Yeah I got that, I handled that in the pool builder because that way the metadata requires no change on packagist.org, which simplifies things quite a bit.

Loading the metadata doesn't matter as the only case it will happen is if someone makes an error requiring an ext with Composer, then it won't work and they will remove the extension from their composer.json.

Seldaek commented 6 months ago

Ok listing is up at https://packagist.org/extensions - closing this for now. We'll move further once we have more packages and usage IMO.