Skip to content
docsv0.13.1

PackageState

Where a package is in its life — and where «installed» stops being one word. ── WHY THIS IS NOT A DECORATIVE ENUM ─────────────────────────────────────────────────────────── `P19.4` is called «the agent installs», and that phrase blends four actions whose risks are nothing alike: acquiring an artifact, quarantining it, reading what it says about itself, and letting its operations hold real capabilities. An agent can hold authority for the first two without holding it for the last — and while all four are called «installing», granting one grants all four. Installing is not activating. Activating is not granting authority. A package can exist on disk while being authorised to do nothing at all. That is not an awkward intermediate state: it is the normal state of everything that arrives from outside.

PackageState::mayHoldCapabilities()

public function mayHoldCapabilities(): bool

Whether a package in this state may hold capabilities. Only two states allow it, and `Attested` is not one of them: being attested means having the classification, not having the permission. The separation exists because these are two decisions and different people make them.

PackageState::afterContentChanges()

public function afterContentChanges(): self

The state an artifact returns to when its content changes. NOT the previous one in the list: the beginning. A new version inherits absolutely nothing from the old one — not the signature, not the classification, not the activation — because what was attested was a digest, and that digest no longer exists.

PackageState::cases()

public static function cases(): array

PackageState::from()

public static function from(string|int $value): static

Parameters

Parameters of from()
NameTypeDescription
$valuestring|int

PackageState::tryFrom()

public static function tryFrom(string|int $value): ?static

Parameters

Parameters of tryFrom()
NameTypeDescription
$valuestring|int