$problems Labels of the problems behind the state (Problem::$label). * @param string|null $source For a released feature: ReleaseStatus::SOURCE_CODE, SOURCE_DATABASE or * SOURCE_AUTO; null otherwise. */ public function __construct( public readonly DiviFeature $feature, public readonly ReleaseState $state, public readonly array $problems = [], public readonly ?string $source = null ) { } public function usable(): bool { return $this->state === ReleaseState::Released; } /** @return array{id: string, label: string, state: string, problems: list} For refusals (D6). */ public function summary(): array { return [ 'id' => $this->feature->value, 'label' => $this->feature->label(), 'state' => $this->state->value, 'problems' => $this->problems, ]; } /** * @return array{id: string, label: string, state: string, problems: list, source: ?string} * For lit-site-status and the admin tab. */ public function toArray(): array { return $this->summary() + ['source' => $this->source]; } }