DependencyResolver
Resolves plugin and Composer dependencies before installation. Checks: - Plugin dependencies (dependencies.plugins in milpa.json) - Composer packages (dependencies.composer in milpa.json) - Capability requirements (canonical `capabilities.requires` records or legacy `contracts.requires` bare FQCNs — both shapes, via the manifest's typed readers)
DependencyResolver::__construct()
public function __construct(string $rootPath):Parameters
| Name | Type | Description |
|---|---|---|
| $rootPath | string |
DependencyResolver::resolve()
public function resolve(Milpa\Plugin\PluginManifest $manifest, array $installedPlugins): Milpa\DTO\DependencyResolutionResolve all dependencies for a plugin to be installed. Capability matching is by IDENTITY: an installed provision satisfies a requirement when its capability id or its interface equals the requirement's `id`, `interface`, or any `oneOf` alternative — the same one-directional superset posture core's CapabilityGraphChecker takes (an install preview must not fail a graph the resolver would close via the interface bridge or `oneOf`). Legacy bare-FQCN declarations on either side behave exactly as before: the FQCN is both id and interface.
Parameters
| Name | Type | Description |
|---|---|---|
| $manifest | PluginManifest | The plugin to install |
| $installedPlugins | array<array{name: string, version?: string, provides?: array<int, (string | array<string, mixed>)>, requires?: array<string>}> |
DependencyResolver::checkComposerDeps()
public function checkComposerDeps(array $requiredPackages): arrayCheck Composer dependencies against what's currently installed. Reads root composer.lock to check installed versions.
Parameters
| Name | Type | Description |
|---|---|---|
| $requiredPackages | array<string, string> | Package => constraint |
Returns
Packages that need to be installed (package => constraint)