VersionManifest
Describes one installed piece — a package or plugin — as the resolver sees it: its `package` name and `version`, the architectural `contracts` it implements/requires, the `capabilities` it provides/requires/suggests, the `surfaces` it supports, the things it has marked `deprecations`, and free-form `metadata` (the ingestion layer stamps `metadata`, e.g. `shape = legacy-contracts`). A pure value object: {@see fromArray()} validates, {@see toArray()} serializes deterministically. `adapters` and `profiles` are deliberately NOT modelled in slice 1: the resolver does not yet resolve adapter or profile requirements, and a declared field the engine never reads is decorative metadata (spec §25 anti-pattern 5). They return as typed fields when the resolver actually consumes them (adapter resolution / env profiles — ROADMAP P10, "second consumer").
VersionManifest::__construct()
public function __construct(string $package, string $version, array $contracts, array $capabilities, array $surfaces = [], array $deprecations = [], array $metadata = []):Parameters
| Name | Type | Description |
|---|---|---|
| $package | string | |
| $version | string | |
| $contracts | array<string, mixed> | |
| $capabilities | array<string, mixed> | |
| $surfaces | array<string, mixed> | |
| $deprecations | array<string, mixed> | |
| $metadata | array<string, mixed> |
VersionManifest::fromArray()
public static function fromArray(array $data): selfBuild a manifest from a decoded array, validating `package` (non-empty), `version` (semver), and the presence of the `contracts` and `capabilities` maps.
Parameters
| Name | Type | Description |
|---|---|---|
| $data | array<string, mixed> |
Throws
InvalidManifestException On a missing/empty required field or an invalid version.
VersionManifest::toArray()
public function toArray(): arraySerialize to an array with a fixed, deterministic key order.