Skip to content
docsv0.34.0

FrameworkFacts

THE ONE PLACE THIS PANEL NAMES `Milpa\AppRuntime\Framework` — by string, on purpose. The provenance family lives in `milpa/app-runtime` because what a house was born from is a fact about the APP, and because applying a reconciliation is a governed act, which is an Operation, which a panel cannot declare (greenhouse decisions/0295). 🚨 AND IT IS REFERENCED BY STRING, WHICH IS THE HOUSE'S OWN IDIOM HERE — see {@see PluginsSource::capabilities()}, which names `Milpa\AppRuntime\Support\Capabilities` exactly this way. `milpa/admin` does not depend on `milpa/app-runtime`: the panel works without it, with fewer facts to show. Adding it as a dev dependency to get typed calls was tried and measured: it turned six green tests red, because the passkey gate's class becomes RESOLVABLE while `milpa/auth` is still absent, so a middleware the container cannot build stops being invisible. Those six are a real coupling and they are not this slice's to fix — installing a package to type-check one file is not worth surfacing them halfway. So the strings live HERE, once, and every caller in this package talks to a typed method instead.

FrameworkFacts::available()

public static function available(): bool

Whether this app carries the package that knows any of this.

FrameworkFacts::version()

public static function version(string $root): ?string

The framework version this house runs on, or null when nothing can say.

Parameters

Parameters of version()
NameTypeDescription
$rootstring

FrameworkFacts::divergence()

public static function divergence(string $root): ?array

The counts of what this house has changed since it was born, or null.

Parameters

Parameters of divergence()
NameTypeDescription
$rootstring

FrameworkFacts::divergenceRows()

public static function divergenceRows(string $root): array

Every file that is not untouched, with what became of it.

Parameters

Parameters of divergenceRows()
NameTypeDescription
$rootstring

FrameworkFacts::lastCheck()

public static function lastCheck(string $root): ?array

What the last update check found, or null when nobody has checked.

Parameters

Parameters of lastCheck()
NameTypeDescription
$rootstring

FrameworkFacts::latest()

public static function latest(): ?string

Asks the registry which release is newest — the only method here that reaches the network.

FrameworkFacts::ships()

public static function ships(string $version, string $root): ?array

A release's tracked-file hashes, from cache when they are there.

Parameters

Parameters of ships()
NameTypeDescription
$versionstring
$rootstring

FrameworkFacts::remember()

public static function remember(string $root, string $version, string $at): void

Remembers which release the last check found, so a render never has to ask.

Parameters

Parameters of remember()
NameTypeDescription
$rootstring
$versionstring
$atstring

FrameworkFacts::reconcile()

public static function reconcile(string $root, array $ships): ?array

What a release would do to this house, judged, or null when it cannot be judged.

Parameters

Parameters of reconcile()
NameTypeDescription
$rootstring
$shipsarray<string, string>