MilpaCore
Static facts and runtime checks about this package's one hard dependency, `milpa/core` — the version constraint milpa/live was built against, which `milpa/core` contracts it relies on, and whether the currently-installed `milpa/core` actually satisfies them. Useful for a host application's own diagnostics/health-check page, not consulted by milpa/live itself at runtime.
MilpaCore::package()
public static function package(): stringThe Composer package name milpa/live depends on: `"milpa/core"`.
MilpaCore::versionConstraint()
public static function versionConstraint(): stringThe Composer version constraint milpa/live requires `milpa/core` at.
MilpaCore::release()
public static function release(): stringThe `milpa/core` release tag milpa/live was built and verified against.
MilpaCore::minimumPhp()
public static function minimumPhp(): stringThe minimum PHP version `milpa/core` (and therefore milpa/live) requires.
MilpaCore::namespacePrefix()
public static function namespacePrefix(): stringThe namespace prefix `milpa/core`'s own symbols live under: `"Milpa\\"`.
MilpaCore::contractMap()
public static function contractMap(): arrayMaps a short, stable key (e.g. `'pluginInterface'`) to the fully qualified `milpa/core` class/interface name it currently resolves to — a single place to update if a `milpa/core` symbol is ever renamed.
MilpaCore::availableContracts()
public static function availableContracts(): arrayChecks every {@see contractMap()} entry against the classes/interfaces actually autoloadable right now, so a caller can tell "milpa/core is * installed" apart from "the specific symbols we depend on exist".
MilpaCore::isRuntimeCompatible()
public static function isRuntimeCompatible(?string $phpVersion = null): boolTrue when `$phpVersion` (defaults to the running `PHP_VERSION`) meets {@see minimumPhp()}.
Parameters
| Name | Type | Description |
|---|---|---|
| $phpVersion | ?string |
MilpaCore::isInstalled()
public static function isInstalled(): boolTrue when `milpa/core` is present — via `Composer\InstalledVersions` when available, falling back to checking for its `composer.json` in `vendor/` (e.g. under a `path` repository during local development).
MilpaCore::installedVersion()
public static function installedVersion(): ?stringThe installed `milpa/core` version (via `Composer\InstalledVersions`, falling back to its `composer.json`'s `version` field), or `null` when neither source can resolve one.
MilpaCore::status()
public static function status(): arrayA single snapshot combining every static fact and runtime check on this class — the shape a diagnostics/health-check endpoint would serialize directly.
MilpaCore::installCommand()
public static function installCommand(): stringThe `composer require` snippet that installs `milpa/core` at {@see versionConstraint()}.