feat(compat): declare core independence with core:"none" (INDEPENDENT status, block inheritance, no warning)

This commit is contained in:
kj
2026-10-06 14:12:36 -03:00
parent fc51133d92
commit 901968d0bd
9 changed files with 247 additions and 69 deletions
@@ -12,6 +12,7 @@ final class Compatibility
public const UNTESTED = 'untested';
public const INSUFFICIENT = 'insufficient';
public const UNKNOWN = 'unknown';
public const INDEPENDENT = 'independent';
/**
* @return array{status:string, message:string}
@@ -19,8 +20,13 @@ final class Compatibility
public static function evaluateCore(
?string $coreVersion,
?string $requires,
?string $tested
?string $tested,
bool $independent = false
): array {
if ($independent) {
return ['status' => self::INDEPENDENT, 'message' => 'independiente del core'];
}
if ($coreVersion === null) {
return ['status' => self::UNKNOWN, 'message' => 'versión del core desconocida (sin tags)'];
}
@@ -68,10 +74,11 @@ final class Compatibility
public static function label(string $status): string
{
return match ($status) {
self::OK => 'OK',
self::UNTESTED => 'NO PROBADO',
self::INSUFFICIENT => 'INSUFICIENTE',
default => 'SIN DATOS',
self::OK => 'OK',
self::UNTESTED => 'NO PROBADO',
self::INSUFFICIENT => 'INSUFICIENTE',
self::INDEPENDENT => 'INDEPENDIENTE',
default => 'SIN DATOS',
};
}
}