Skip to content

spec: add Composer ecosystem metadata fields and env key registry#91

Open
toderash wants to merge 2 commits into
mainfrom
spec/composer-metadata
Open

spec: add Composer ecosystem metadata fields and env key registry#91
toderash wants to merge 2 commits into
mainfrom
spec/composer-metadata

Conversation

@toderash
Copy link
Copy Markdown
Member

@toderash toderash commented May 8, 2026

Summary

Three interrelated changes supporting Composer ecosystem integration. Grouped in one PR because x-composer-requires keys reference the composer-name format, and the env key registry documents the mappings that both fields depend on.

  • composer-name (Metadata Document) — optional field declaring the canonical vendor/package Composer name. Provides the FAIR → Composer direction of the bidirectional identity link; the Composer → FAIR direction is extra.fair.package-did in an extension's composer.json (specified in the TYPO3 extension, applicable to any Composer-distributed package).

  • x-composer-requires (Release Document) — optional map of Composer-native dependencies not registered in FAIR. Covers the common case where transitive deps (libraries, framework packages) have no FAIR DID and must be resolved through Packagist or a compatible registry. These are not FAIR-verified; they travel under the x- prefix to signal that they are outside the core FAIR trust model.

  • x-composer-repositories (Release Document) — optional source hints for x-composer-requires entries not resolvable through standard public registries (e.g. commercial plugins with private Composer endpoints). Clients MUST present additions to the user before writing them and MUST NOT add non-HTTPS repositories without explicit confirmation.

  • Environment keys table (registry.md) — registers env:php, env:php-{name}, env:typo3, and env:wp with value format and Composer platform package mappings. Per the requires spec, unregistered env: keys are client blockers ("SHOULD treat as unfulfilled"); these keys are in active use in TYPO3 and WordPress release records.

Test plan

  • Confirm composer-name ABNF is consistent with Composer's own schema documentation (linked)
  • Confirm x-composer-requires key constraint correctly cross-references composer-name format
  • Confirm x-composer-repositories HTTPS requirement is unambiguous
  • Confirm env key table covers all keys referenced in ext-typo3.md and ext-wp.md
  • Confirm env:php-{name} pattern note is clear about the * value semantic

🤖 Generated with Claude Code

…, and env key registry

Adds three interrelated changes to support Composer ecosystem integration:

- `composer-name` (Metadata Document): optional field declaring the canonical
  Composer vendor/package name, providing the FAIR → Composer direction of the
  bidirectional identity link.

- `x-composer-requires` (Release Document): optional map of Composer-native
  dependencies not registered in FAIR, allowing full dependency graph resolution
  for packages whose transitive deps have no FAIR DIDs.

- `x-composer-repositories` (Release Document): optional source hints for
  x-composer-requires entries not resolvable through standard public registries.

- Environment keys table (registry.md): registers env:php, env:php-{name},
  env:typo3, and env:wp with value format and Composer platform package mappings.
  Unregistered env: keys are effectively client blockers per the requires spec.

Signed-off-by: toderash <brent@toderash.net>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Brent Toderash <brent@toderash.net>
@toderash toderash marked this pull request as ready for review May 8, 2026 18:07
@toderash toderash added the documentation Improvements or additions to documentation label May 8, 2026
@toderash
Copy link
Copy Markdown
Member Author

Semi-randomly tagged interested parties for reviews & comments - adding composer support to the protocol so we have something to implement against.

@toderash toderash added the enhancement New feature or request label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant