'Modulkatalog (Kurzform-Pfade)', self::FORMAT => 'Format im Speicher (Parser und Serializer)', self::WRITE => 'Schreibtest auf einer Wegwerfseite', ]; /** @param list $problems */ public static function step(string $key, array $problems, bool $skipped = false): CheckStep { return new CheckStep($key, $problems, $skipped, self::LABELS[$key] ?? null); } /** * The Profile::$extraSteps of Divi: module catalog, format round trip and the write test. The write test is * skipped only when Divi functions are missing (it would fail anyway), not when only fingerprints changed – so * --update-reference can see whether everything else still works. * * @param Closure(): list $catalog Short-form problems against Divi's live catalog. * @param Closure(): list $probe WriteProbe::run(). * @return Closure(bool): list */ public static function extra(Closure $catalog, FormatCheck $format, Closure $probe): Closure { return static fn (bool $manifestClean): array => [ self::step(self::CATALOG, CompatibilityCheck::guarded($catalog)), self::step(self::FORMAT, CompatibilityCheck::guarded(static fn (): array => $format->problems())), $manifestClean ? self::step(self::WRITE, CompatibilityCheck::guarded($probe)) : self::step(self::WRITE, [], true), ]; } public static function label(CheckStep $step): string { // Reports saved before labels were stored have none. return $step->label ?? self::LABELS[$step->key] ?? CheckStep::genericLabel($step->key, DiviProfile::LABEL) ?? $step->key; } }