Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,199 of 9,199 pages
About the help in other languages
All help pages

Port plan: Packagist to Exponential

exp_package_registry is a port of Packagist (MIT) to Exponential, studied at commit 99a280af (2026-11-30). Packagist is a Symfony application on Doctrine, Redis and Algolia. The port keeps what Composer and Packagist…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/ext/exp_package_registry/port-plan.md

On this page

Port plan: Packagist to Exponential

exp_package_registry is a port of Packagist (MIT) to Exponential, studied at commit 99a280af (2026-11-30). Packagist is a Symfony application on Doctrine, Redis and Algolia. The port keeps what Composer and Packagist clients see (paths, JSON shapes, the update rules) and puts it on what an Exponential installation already has: eZPersistentObject tables on all five databases, the job queue (expqueue), modules and templates, and the administration's design rules.

What maps to what

Packagistexp_package_registry
Entity\Package (name, vendor, repository, type, description, crawledAt, dumpedAtV2, abandoned, replacementPackage, maintainers)exppkg_package / expPackageRegistryPackage; plus visibility (public or private), credential (for a private repository), dist_mode, state, last_error, readme (Packagist keeps that in PackageReadme)
Entity\Version (version, normalizedVersion, development, source, dist, composer fields, releasedAt, isDefaultBranch)exppkg_version / expPackageRegistryVersion: the composer.json at the reference as JSON in data; the dist's file, SHA-1, SHA-256 and signature; blocked, scan_state
RequireLink, DevRequireLink, ConflictLink ... (one table per link type)inside data: the registry has no dependents page yet, so the link tables are not needed (wave 3 can add an index table)
maintainers (User many-to-many)exppkg_maintainer (site users, role owner or maintainer)
Entity\Download + Redis countersexppkg_download (package, version, day: hits)
Package\Updater (Composer VCS drivers, VcsRepository)expPackageRegistryCrawler + expPackageRegistryGit: one bare mirror per package (heads and tags), read with git for-each-ref and git show; any git host, private repositories with a credential
Package\Updater::applyStableImmutabilityGatekept: a published stable tag keeps its reference when the tag moves ([Crawler] ImmutableStableTags)
version normalization (composer/semver VersionParser)expPackageRegistryVersionParser (a faithful port: tags, numeric branches 1.x-dev, dev-<branch>)
Package\V2Dumper (packages.json, p2/<name>.json, ~dev.json, minified)expPackageRegistryMetadata: the same files, minified with composer/metadata-minifier's algorithm, cached in <data>/metadata/p2, served with Last-Modified / 304
dists from GitHub/GitLab (api.github.com/.../zipball)default mode builds the zip here (git archive), SHA-1 for Composer, SHA-256 and an Ed25519 signature; metadata mode keeps the VCS host's zipballs
Service\UpdaterWorker + Scheduler (Redis queue, cron)expPackageRegistryQueueHandler (expqueue job types registry.crawl, registry.build, registry.scan) + the scheduler command on a systemd timer
API: /packages/list.json, /search.json, /packages/<name>.json, /packages/<name>/stats.json, /providers/<name>.json, notify-batch /downloads/the same paths and shapes (expPackageRegistryApi, expPackageRegistryServer)
search (Algolia)SQL LIKE over name, description and keywords (good to some thousands of packages; a search index is wave 3+)
web front (Twig): home, search, package page, statistics, submitmodule registry (list, package, stats, submit) with templates; admin pages in Setup
GitHub hooks / API tokens for auto-updatenot yet: the timer crawls every [Crawler] Interval; a maintainer can ask for a crawl; push hooks come in wave 3
security advisories, filter lists, transparency log, organizations, 2FA, spamnot ported (Packagist.org's scale problems); advisories are read from Packagist by the composer-audit check

What is new beside Packagist

  • Private packages by license key. A private package's metadata and dists answer only to a license key that opens it (exppkg_license_key, Composer http-basic or bearer). The source is a private git repository the registry reads with a credential; the zips are built here and served only through that auth.
  • Signed dists. Every zip has an Ed25519 signature over exp-dist-v1:<sha256>:<package>:<version>:<reference>; the metadata carries it as dist-signature, the public key is at /keys/registry.pub.
  • Three modes. composer (default), metadata (dists from the VCS host) and api (REST and GraphQL only).
  • REST and GraphQL beside Packagist's API, with checksums, signatures and the results of the checks.
  • A CI hook per release (doc/ci.md): php -l on each PHP version, composer audit, encoded code, license and docs, the kernel's design rules and API rules, phpcs and phpstan; failures that block keep the release out of the metadata. Runners are pluggable; the cluster runner is an interface with a stub in this wave.

Order of work (wave 2)

  1. Tables and schema files for the five engines (expqueue's schema pattern).
  2. Git access, version parser, crawler, dist builder and signer.
  3. Composer v2 metadata and the HTTP endpoints; license key auth.
  4. Packagist, REST and GraphQL APIs.
  5. Queue handler and the scheduler with its systemd timer.
  6. CI hook and the local runner; cluster runner interface.
  7. Web front and admin pages, styling tests.
  8. Proof on a tmpfs test site: submit a se7enxweb package, crawl it, composer require it in a throwaway project, a private package refused without a key and served with one.

Something wrong on this page? Report an error

Documentation license

This page is part of the documentation of the extension exp_package_registry and is distributed under the license of that extension.