Closed asgrim closed 6 months ago
Parts of this are already WIP - see composer/composer#11795
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):
packagist.org/extensions/
). This might require solving the case where different versions of a package have different types.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)
Everything should be ready to submit to packagist now, I'll add an extensions list page later.
@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.
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.
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.
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:
composer.json
name
of the package would beext-<extname>
(this is forbidden at the moment, due to the naming regex)type
of the package would bephp-ext
(for a PHP module) orphp-ext-zend
(for a Zend Extension)php-ext
is a proposed new top level element incomposer.json
- proposed JSON schema is here for referenceExample 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: