exp_package_registry
The Exponential package registry: a Composer repository with a web front, ported from Packagist to an Exponential extension. It runs packages.exponential.earth and, with the same code, packages.se7enx.com.
- Submit a package by the URL of its git repository (GitHub, GitLab, any git host, private repositories with a credential). A queued job (expqueue) crawls it: every tag that is a version becomes a release, every branch a dev version; a systemd timer crawls again every few hours.
- Composer v2:
packages.jsonandp2/<vendor>/<name>.json(minified), with dist zips built here, checksummed (SHA-1, SHA-256) and signed (Ed25519), stored outside the web root. Modes: composer (default), metadata (code from the VCS host), api (REST and GraphQL only). - Private packages: metadata and zips only with a license key, as Composer http-basic or bearer.
- APIs: Packagist's (
packages/list.json,search.json,packages/<name>.json), REST underrest/and GraphQL. - Web front: search, package pages with versions, readme, maintainers, downloads and checks; statistics; submission. Admin pages in Setup > Package registry (packages, license keys, checks), built to the admin4 rules.
- A CI hook per release: php -l, composer audit, encoded code, license and docs, the kernel's design and API rules, phpcs and phpstan; blocking failures keep a release out of the metadata.
Works on MySQL/MariaDB, PostgreSQL, SQLite, Oracle and MongoDB.
Install
composer require se7enxweb/exp_package_registry
# settings/override/site.ini.append.php: ActiveExtensions[]=exp_package_registry
php bin/php/ezpgenerateautoloads.php -e
./console ext:exp_package_registry:install-schema
./console ext:exp_package_registry:timer install # root; --dry-run shows the unitsThen set [Registry] PublicURL and [Storage] DataDir (outside the web root) in
settings/override/exppackageregistry.ini.append.php, and the vhost rules of doc/hosting.md.
Use it
composer config repositories.exponential composer https://packages.exponential.earth
composer require vendor/package
# a private package:
composer config http-basic.packages.exponential.earth <account> <license key>Documentation
- doc/registry.md: using packages.exponential.earth and packages.se7enx.com: installing, signed dists, private packages, submitting, the checks (German: doc/ger-de/registry.md)
- doc/port-plan.md: what was ported from Packagist and how it maps
- doc/hosting.md: the vhost, the data directory, the timer and the worker
- doc/settings.md: every setting
- doc/api.md: Composer, Packagist, REST and GraphQL endpoints; license keys; signatures
- doc/ci.md: the checks of a release and the CI runner interface
- doc/commands.md: the command line
- CHANGELOG.md
License
GNU General Public License v2.0 (or any later version). The version normalization follows composer/semver and the metadata minification composer/metadata-minifier (both MIT).