Repository navigation
feat(packagist): add PHP packages from Packagist as a fifth registry - #14
Merged
Merged
Conversation
Versions come from the Composer v2 metadata on repo.packagist.org, ordered by Composer's own rules; release notes come from GitHub like PyPI. OSV covers Packagist advisories, the audit reads composer.json and composer.lock, and the registry row is added on start-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e page copy The registry tests build their own client list and checked a package id that is not a vendor/name; the SSR smoke test and index.html still named four registries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Packagist (PHP / Composer) as a fifth registry next to NuGet, npm, PyPI and pub.dev. You can compare versions of
vendor/packagepackages (laravel/framework,symfony/console, ...), see their advisories, and audit acomposer.jsonorcomposer.lock.Why
PHP is one of the largest ecosystems without coverage on pkgdiff. Packagist publishes no release notes of its own, but almost every package lives on GitHub. This is the same situation as PyPI, so the existing GitHub-first pipeline fits without new scraping code.
Changes
PackagistServicereads the Composer v2 metadata (repo.packagist.org/p2/{vendor}/{package}.json). This is a static, CDN-served file with no documented rate limit. The service expands its minified format (later entries only list changed fields;__unsetremoves one) and reads it once per request scope, because an analysis asks for many versions of the same package.PackagistRegistryClientusesGitHubFirstScrapingStrategywithPublishesReleaseNotes = false, like PyPI.VersionScheme.ComposerandComposerVersion. They order versions the way Composer does:dev < alpha < beta < RC < stable < patch, up to four numeric segments, and trailing zeros ignored. Versions are exposed without their leadingv(v6.4.1becomes6.4.1), so they matchcomposer.jsonconstraints and OSV ranges. The GitHub readers already stripvwhen matching tags.RegistryNames.Packagist = "packagist"with the aliascomposer.PackageIdRulesgains a linear-timevendor/namegrammar (lower case, as Packagist requires).PackagistRepositorynamed client with the registry size cap and aUser-Agentthat names the site, which Packagist asks API clients to send.Packagist. deps.dev and Socket do not cover Packagist; their clients already return nothing for unknown registries. The health panel therefore falls back to the OpenSSF Scorecard of the GitHub repository, as it does for pub.dev.ManifestParserreadscomposer.json(require,require-dev) andcomposer.lock(packages,packages-dev). It skips platform requirements (php,ext-*,lib-*,composer-plugin-api) and treatsdev-*branches as "latest is checked".DatabaseSeederadds apackagistrow at start-up when no spelling of it exists yet, so the registry appears without a manual admin step.composer require) and a Packagist link.packagist.svgicon./package/packagist/symfony/console(the canonical URL the SEO service emits) resolves tosymfony/consoleinstead of packagesymfonywith versionconsole.Notes for reviewers
symfony/symfonyand have no GitHub releases of their own. Their notes may come back empty until a monorepo changelog fallback is added.laravel/framework,guzzlehttp/guzzleand most packages publish GitHub releases.packagist.svgis a simple placeholder package icon, not the official Packagist logo.Checklist
developand is about one thingfeat(scope): ...,fix(scope): ...)src/frontend/src/app/core/models